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