Skip to content

Commit aaf944e

Browse files
committed
Add variant prop
1 parent 7b0ee33 commit aaf944e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/app/conf/_design-system/button.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ import { clsx } from "clsx"
22
import { Anchor } from "./anchor"
33

44
type Size = "md" | "lg"
5+
type Variant = "primary" | "secondary"
56

67
// eslint-disable-next-line @typescript-eslint/no-namespace
78
export declare namespace ButtonProps {
89
export interface BaseProps {
910
size?: Size
11+
variant?: Variant
1012
}
1113

1214
export interface AnchorProps
@@ -54,11 +56,11 @@ export type ButtonProps =
5456

5557
export function Button(props: ButtonProps) {
5658
const className = clsx(
57-
"relative flex items-center justify-center gap-2.5 rounded-lg font-normal text-base/none text-neu-0 font-sans h-14 px-8 data-[size=md]:h-12",
59+
"relative flex items-center justify-center gap-2.5 font-normal text-base/none text-neu-0 font-sans h-14 px-8 data-[size=md]:h-12 data-[variant=secondary]:bg-neu-100 data-[variant=secondary]:light:text-neu-900",
5860
props.className,
5961
)
6062

61-
const styleAttrs = { "data-size": props.size }
63+
const styleAttrs = { "data-size": props.size, "data-variant": props.variant }
6264

6365
if ("href" in props && typeof props.href === "string") {
6466
const { className: _1, size: _2, children, ...rest } = props

0 commit comments

Comments
 (0)