feat: button styles

This commit is contained in:
2025-04-03 14:57:24 +03:00
parent 02ee281ae5
commit 38da06643c

View File

@@ -11,10 +11,15 @@ const button = tv({
},
});
const Button: FunctionComponent<{ onClick: () => void }> = (props) => {
interface ButtonProps {
color?: "primary" | "secondary";
onClick: () => void;
}
const Button: FunctionComponent<ButtonProps> = ({ children, onClick, color = "primary" }) => {
return (
<button type="button" class={button({ color: "primary" })} onClick={props.onClick}>
{props.children}
<button type="button" class={button({ color: color })} onClick={onClick}>
{children}
</button>
);
};