mirror of
https://github.com/sussy-code/smov.git
synced 2024-12-25 15:27:40 +01:00
19 lines
492 B
TypeScript
19 lines
492 B
TypeScript
|
import { ButtonControlProps, ButtonControl } from "./ButtonControl";
|
||
|
import { Icon, Icons } from "components/Icon";
|
||
|
|
||
|
export interface IconButtonProps extends ButtonControlProps {
|
||
|
icon: Icons;
|
||
|
}
|
||
|
|
||
|
export function IconButton(props: IconButtonProps) {
|
||
|
return (
|
||
|
<ButtonControl
|
||
|
{...props}
|
||
|
className="flex items-center px-4 py-2 space-x-2 bg-pink-900 text-white rounded-full"
|
||
|
>
|
||
|
<Icon icon={props.icon} />
|
||
|
<span>{props.children}</span>
|
||
|
</ButtonControl>
|
||
|
);
|
||
|
}
|