From 389a3d8d6b3f996a249167ca02d62feff9642fb6 Mon Sep 17 00:00:00 2001 From: Rafael Youakeem Date: Fri, 13 Sep 2024 17:04:42 +0200 Subject: [PATCH] Create Button outline variant --- .../components/DetailsList/DetailsList.css.ts | 13 ++++++++----- .../src/components/DetailsList/DetailsList.tsx | 13 ++++++++++--- .../ui/src/components/Button/Button.css.ts | 18 ++++++++++++++++++ .../src/components/Button/Button.stories.tsx | 9 +++++++++ packages/ui/src/components/Button/Button.tsx | 9 ++++++++- 5 files changed, 53 insertions(+), 9 deletions(-) diff --git a/apps/store/src/components/DetailsList/DetailsList.css.ts b/apps/store/src/components/DetailsList/DetailsList.css.ts index a58a136b82..e367d0d372 100644 --- a/apps/store/src/components/DetailsList/DetailsList.css.ts +++ b/apps/store/src/components/DetailsList/DetailsList.css.ts @@ -1,10 +1,13 @@ import { style } from '@vanilla-extract/css' -import { tokens, xStack } from 'ui' +import { tokens, xStack, yStack } from 'ui' -export const detailsListRoot = style({ - listStyle: 'none', - color: tokens.colors.textTranslucentSecondary, -}) +export const detailsListRoot = style([ + yStack({ gap: 'xxs' }), + { + listStyle: 'none', + color: tokens.colors.textTranslucentSecondary, + }, +]) export const detailsListItem = style([ xStack({ justifyContent: 'space-between' }), diff --git a/apps/store/src/components/DetailsList/DetailsList.tsx b/apps/store/src/components/DetailsList/DetailsList.tsx index 424b559f44..14efe73f31 100644 --- a/apps/store/src/components/DetailsList/DetailsList.tsx +++ b/apps/store/src/components/DetailsList/DetailsList.tsx @@ -1,6 +1,6 @@ import clsx from 'clsx' import { type ComponentProps } from 'react' -import { type FontSizeProps, sprinkles } from 'ui' +import { type FontSizeProps, type Sprinkles, yStack } from 'ui' import { detailsListItem, detailsListLabel, @@ -10,10 +10,17 @@ import { type RootProps = ComponentProps<'ul'> & { size?: FontSizeProps + gap?: Sprinkles['gap'] } -const DetailsListRoot = ({ size = 'xs', className, children, ...props }: RootProps) => { +const DetailsListRoot = ({ + size = 'xs', + gap = 'xxs', + className, + children, + ...props +}: RootProps) => { return ( -