feat: form hook

This commit is contained in:
2025-04-23 12:32:27 +03:00
parent 2a7d41bba5
commit c629f0dcf8
7 changed files with 62 additions and 41 deletions

View File

@@ -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>
);