Skip to content

Commit f67b40b

Browse files
committed
fix(frontend): add new button variant
1 parent 7ce5fbc commit f67b40b

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

frontend/src/components/Button.tsx

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ const primaryStyle = clsx(
1212
);
1313

1414
const secondaryStyle = clsx(
15+
baseStyle,
16+
"bg-transparent border-2 border-white",
17+
"hover:bg-primary-blue hover:border-primary-blue hover:text-background-2"
18+
);
19+
20+
const tertiaryStyle = clsx(
1521
baseStyle,
1622
"bg-transparent border-2 border-white",
1723
"hover:bg-white/10"
@@ -21,7 +27,7 @@ const secondaryStyle = clsx(
2127
interface IButton extends React.ComponentProps<"button"> {
2228
children: React.ReactNode;
2329
onClick?: () => void;
24-
variant?: "primary" | "secondary";
30+
variant?: "primary" | "secondary" | "tertiary";
2531
className?: string;
2632
}
2733

@@ -33,9 +39,12 @@ const Button: React.FC<IButton> = ({
3339
...props
3440
}) => (
3541
<button
36-
className={
37-
clsx(variant === "primary" ? primaryStyle : secondaryStyle, className)
38-
}
42+
className={clsx(
43+
variant === "primary" && primaryStyle,
44+
variant === "secondary" && secondaryStyle,
45+
variant === "tertiary" && tertiaryStyle,
46+
className
47+
)}
3948
{...{ onClick, ...props }}
4049
>
4150
{children}

0 commit comments

Comments
 (0)