1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-24 15:17:41 +01:00
smov/src/components/buttons/IconButton.tsx

19 lines
512 B
TypeScript
Raw Normal View History

2022-12-13 23:50:13 +01:00
import { Icon, Icons } from "@/components/Icon";
2022-03-06 13:43:32 +01:00
import { ButtonControlProps, ButtonControl } from "./ButtonControl";
2022-02-10 23:45:17 +01:00
export interface IconButtonProps extends ButtonControlProps {
icon: Icons;
}
export function IconButton(props: IconButtonProps) {
return (
<ButtonControl
{...props}
2022-12-13 23:50:13 +01:00
className="flex items-center space-x-2 rounded-full bg-bink-200 px-4 py-2 text-white hover:bg-bink-300"
2022-02-10 23:45:17 +01:00
>
<Icon icon={props.icon} />
<span>{props.children}</span>
</ButtonControl>
);
}