movie-web/src/components/buttons/IconPatch.tsx

26 lines
809 B
TypeScript
Raw Normal View History

2022-12-13 23:50:13 +01:00
import { Icon, Icons } from "@/components/Icon";
export interface IconPatchProps {
active?: boolean;
onClick?: () => void;
clickable?: boolean;
className?: string;
icon: Icons;
}
export function IconPatch(props: IconPatchProps) {
return (
<div className={props.className || undefined} onClick={props.onClick}>
<div
2022-12-13 23:50:13 +01:00
className={`flex h-12 w-12 items-center justify-center rounded-full border-2 border-transparent bg-denim-300 transition-[color,transform,border-color] duration-75 ${
props.clickable
2022-12-13 23:50:13 +01:00
? "cursor-pointer hover:scale-110 hover:bg-denim-400 hover:text-white active:scale-125"
: ""
2022-12-13 23:50:13 +01:00
} ${props.active ? "border-bink-600 bg-bink-100 text-bink-600" : ""}`}
>
<Icon icon={props.icon} />
</div>
</div>
);
}