添加文本朗读器

This commit is contained in:
2025-10-07 19:32:00 +08:00
parent 67ab729d15
commit b4d62ef111
19 changed files with 272 additions and 145 deletions

View File

@@ -2,20 +2,22 @@ import Image from "next/image";
interface IconClickProps {
src: string;
alt: string;
onClick?: () => void;
src: string;
alt: string;
onClick?: () => void;
className?: string;
size?: number
}
export default function IconClick(
{ src, alt, onClick = () => { } }: IconClickProps) {
return (<>
<div onClick={onClick} className="hover:cursor-pointer hover:bg-gray-200 rounded-3xl p-1">
<Image
src={src}
width={32}
height={32}
alt={alt}
></Image>
</div>
</>);
{ src, alt, onClick = () => { }, className = '', size = 32 }: IconClickProps) {
return (<>
<div onClick={onClick} className={`hover:cursor-pointer hover:bg-gray-200 rounded-3xl w-[${size}px] h-[${size}px] flex justify-center items-center ${className}`}>
<Image
src={src}
width={size - 5}
height={size - 5}
alt={alt}
></Image>
</div>
</>);
}