新增全语言翻译器

This commit is contained in:
2025-10-06 18:50:00 +08:00
parent be78ca3976
commit 609ac69778
12 changed files with 340 additions and 95 deletions

View File

@@ -1,22 +1,19 @@
export default function Button({
label,
onClick,
className,
disabled
className = '',
selected = false
}: {
label:
string, onClick?: () => void,
string,
onClick?: () => void,
className?: string,
disabled?: boolean
selected?: boolean
}) {
return (
<button
onClick={onClick}
className={`px-2 py-1 rounded bg-white shadow-2xs font-bold hover:bg-gray-300 ${className || ''}`}
style={{
opacity: disabled ? 0.0 : 1,
cursor: disabled ? 'none' : 'pointer'
}}
className={`px-2 py-1 rounded shadow-2xs font-bold hover:bg-gray-300 hover:cursor-pointer ${selected ? 'bg-gray-300' : "bg-white"} ${className}`}
>
{label}
</button>

View File

@@ -0,0 +1,21 @@
import Image from "next/image";
interface IconClickProps {
src: string;
alt: string;
onClick?: () => void;
}
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>
</>);
}