feat: form hook
This commit is contained in:
@@ -16,6 +16,7 @@ interface ButtonProps {
|
||||
color?: "primary" | "secondary" | "red";
|
||||
onClick?: () => void;
|
||||
className?: string;
|
||||
type?: "button" | "submit";
|
||||
}
|
||||
|
||||
const Button: FunctionComponent<ButtonProps> = ({
|
||||
@@ -23,9 +24,10 @@ const Button: FunctionComponent<ButtonProps> = ({
|
||||
onClick = () => {},
|
||||
color = "primary",
|
||||
className = "",
|
||||
type = "button",
|
||||
}) => {
|
||||
return (
|
||||
<button type="button" class={button({ color: color, class: className })} onClick={onClick}>
|
||||
<button type={type} class={button({ color: color, class: className })} onClick={onClick}>
|
||||
{children}
|
||||
</button>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user