Skip to content

Commit 0a98c31

Browse files
improve landing hero
1 parent 39f747b commit 0a98c31

File tree

4 files changed

+177
-830
lines changed

4 files changed

+177
-830
lines changed

packages/ui/src/button/index.tsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { BaseUIProps, ChildrenProp } from "src/_types";
55
import { Link } from "src/link";
66

77
export interface ButtonProps extends BaseUIProps, ChildrenProp {
8-
variant: "v1" | "v2" | "v3";
8+
variant: "v1" | "v2" | "v3" | "v4";
99
onClick?: (event: MouseEvent<HTMLElement>) => void;
1010
href?: string;
1111
}
@@ -16,12 +16,25 @@ const variantToMUIButtonVariant: Record<
1616
> = {
1717
v2: "text",
1818
v3: "contained",
19+
v4: "outlined",
1920
};
2021

2122
export const Button: FC<ButtonProps> = ({ children, variant, margin, ...props }) => {
2223
const { toCSSMargin } = useTheme();
2324

2425
switch (variant) {
26+
case "v4":
27+
return (
28+
<MUIButton
29+
sx={{ margin: toCSSMargin(margin), textTransform: "capitalize" }}
30+
{...props}
31+
variant="outlined"
32+
LinkComponent={Link}
33+
>
34+
{children}
35+
</MUIButton>
36+
);
37+
2538
case "v1":
2639
return (
2740
<Link {...props} variant="v2" margin={margin}>
@@ -32,7 +45,7 @@ export const Button: FC<ButtonProps> = ({ children, variant, margin, ...props })
3245
default:
3346
return (
3447
<MUIButton
35-
sx={{ margin: toCSSMargin(margin) }}
48+
sx={{ margin: toCSSMargin(margin), textTransform: "capitalize" }}
3649
{...props}
3750
variant={variantToMUIButtonVariant[variant]}
3851
LinkComponent={Link}

0 commit comments

Comments
 (0)