diff --git a/pkgs/clan-app/ui/src/components/Button/Button.css b/pkgs/clan-app/ui/src/components/Button/Button.css index 0f6df1fe2..842972a7b 100644 --- a/pkgs/clan-app/ui/src/components/Button/Button.css +++ b/pkgs/clan-app/ui/src/components/Button/Button.css @@ -1,17 +1,12 @@ .button { @apply flex gap-2 shrink-0 items-center justify-center; - @apply px-4 py-2; - - height: theme(height.9); - border-radius: 3px; + @apply h-[2.125rem] px-4 py-2 rounded-[0.1875rem]; /* Add transition for smooth width animation */ transition: width 0.5s ease 0.1s; &.s { - @apply px-3 py-1.5; - height: theme(height.7); - border-radius: 2px; + @apply h-[1.625rem] px-3 py-1.5 rounded-[0.125rem]; &:has(> .icon-start):has(> .label) { @apply pl-2; @@ -22,6 +17,18 @@ } } + &.xs { + @apply h-[1.125rem] gap-0.5 p-2 rounded-[0.125rem]; + + &:has(> .icon-start):has(> .label) { + @apply pl-1.5; + } + + &:has(> .icon-end):has(> .label) { + @apply pr-1.5; + } + } + &.primary { @apply bg-inv-acc-4 fg-inv-1; @apply border border-solid border-inv-4; diff --git a/pkgs/clan-app/ui/src/components/Button/Button.stories.tsx b/pkgs/clan-app/ui/src/components/Button/Button.stories.tsx index e86178276..98c246871 100644 --- a/pkgs/clan-app/ui/src/components/Button/Button.stories.tsx +++ b/pkgs/clan-app/ui/src/components/Button/Button.stories.tsx @@ -8,7 +8,7 @@ const getCursorStyle = (el: Element) => window.getComputedStyle(el).cursor; const ButtonExamples: Component = (props) => ( <> -
+
+
+ +
+
+ +
+ +
+
+ +
+
+ +
+
+
+ +
+
+ +
+
+
+
+
+
); diff --git a/pkgs/clan-app/ui/src/components/Button/Button.tsx b/pkgs/clan-app/ui/src/components/Button/Button.tsx index 78396338f..a8d27eab1 100644 --- a/pkgs/clan-app/ui/src/components/Button/Button.tsx +++ b/pkgs/clan-app/ui/src/components/Button/Button.tsx @@ -7,7 +7,7 @@ import "./Button.css"; import Icon, { IconVariant } from "@/src/components/Icon/Icon"; import { Loader } from "@/src/components/Loader/Loader"; -export type Size = "default" | "s"; +export type Size = "default" | "s" | "xs"; export type Hierarchy = "primary" | "secondary"; export type Action = () => Promise; @@ -28,6 +28,7 @@ export interface ButtonProps const iconSizes: Record = { default: "1rem", s: "0.8125rem", + xs: "0.625rem", }; export const Button = (props: ButtonProps) => {