From 3e49b031298d2af765edcba5d11bac79b305e0d6 Mon Sep 17 00:00:00 2001 From: p-sw Date: Sun, 2 Jun 2024 03:20:20 +0900 Subject: [PATCH] fix: add link size in Button --- packages/react/components/Button.tsx | 3 ++- packages/react/src/docs/components/Button.mdx | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/react/components/Button.tsx b/packages/react/components/Button.tsx index c64a3da..86cbb9c 100644 --- a/packages/react/components/Button.tsx +++ b/packages/react/components/Button.tsx @@ -29,6 +29,7 @@ const [buttonVariants, resolveVariants] = vcn({ base: `w-fit flex flex-row items-center justify-between rounded-md outline outline-1 outline-transparent outline-offset-2 ${colors.outline.focus} transition-all`, variants: { size: { + link: "p-0 text-base", sm: "px-2 py-1 text-sm", md: "px-4 py-2 text-base", lg: "px-5 py-3 text-lg", @@ -77,7 +78,7 @@ const [buttonVariants, resolveVariants] = vcn({ border: "none", background: "transparent", decoration: "link", - size: "md", + size: "link", }, success: { border: "success", diff --git a/packages/react/src/docs/components/Button.mdx b/packages/react/src/docs/components/Button.mdx index 33fb0e1..ad8eff8 100644 --- a/packages/react/src/docs/components/Button.mdx +++ b/packages/react/src/docs/components/Button.mdx @@ -50,7 +50,7 @@ import { Button } from "@components/Button"; | Prop | Type | Default | Description | | :--- | :--- | :------ | :---------- | -| `size` | `"sm" \| "md" \| "lg" \| "icon"` | `"md"` | The size of the button | +| `size` | `"link" \| "sm" \| "md" \| "lg" \| "icon"` | `"md"` | The size of the button | | `border` | `"none" \| "solid" \| "success" \| "warning" \| "danger"` | `"solid"` | The border color of the button | | `background` | `"default" \| "ghost" \| "success" \| "warning" \| "danger" \| "transparent"` | `"default"` | The background color of the button | | `decoration` | `"none" \| "link"` | `"none"` | The inner text decoration of the button |