fp/packages/next/app/components/vtuber-button.tsx

29 lines
824 B
TypeScript
Raw Normal View History

2024-06-13 02:54:44 +00:00
import Image from "next/legacy/image"
2024-01-20 16:16:14 +00:00
interface VtuberButtonProps {
image: string;
displayName: string;
size?: string;
}
export default function VtuberButton ({ image, displayName, size }: VtuberButtonProps) {
const sizeClass = (() => {
if (size === 'large') return 'is-large';
if (size === 'medium') return 'is-medium';
if (size === 'small') return 'is-small'
})();
return (
<div className={`button ${sizeClass}`}>
<span className="icon image">
<Image
className='is-rounded'
src={image}
alt={displayName}
width={32}
height={32}
/>
</span>
<span>{displayName}</span>
</div>
);
}