feat: some button style changes

This commit is contained in:
2025-04-07 12:42:25 +03:00
parent a6a145f712
commit 6c1efe702c
2 changed files with 3 additions and 3 deletions

View File

@@ -1,5 +1,5 @@
@reference '../../index.scss'; @reference '../../index.scss';
.button { .button {
@apply rounded-2xl border-2 py-3 font-semibold text-white transition-colors hover:cursor-pointer; @apply rounded-2xl border-2 px-4 py-3 font-semibold text-white transition-colors hover:cursor-pointer;
} }

View File

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