2022-02-10 23:45:17 +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-02-13 18:49:03 +01:00
|
|
|
className="flex items-center px-4 py-2 space-x-2 bg-bink-200 hover:bg-bink-300 text-white rounded-full"
|
2022-02-10 23:45:17 +01:00
|
|
|
>
|
|
|
|
<Icon icon={props.icon} />
|
|
|
|
<span>{props.children}</span>
|
|
|
|
</ButtonControl>
|
|
|
|
);
|
|
|
|
}
|