feat: button styles
This commit is contained in:
@@ -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 (
|
return (
|
||||||
<button type="button" class={button({ color: "primary" })} onClick={props.onClick}>
|
<button type="button" class={button({ color: color })} onClick={onClick}>
|
||||||
{props.children}
|
{children}
|
||||||
</button>
|
</button>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user