diff --git a/packages/components/src/avatar/avatar.tsx b/packages/components/src/avatar/avatar.tsx index 5cb8fa4c..b679eeb9 100644 --- a/packages/components/src/avatar/avatar.tsx +++ b/packages/components/src/avatar/avatar.tsx @@ -88,10 +88,10 @@ const Base = styled(Stack, { shape: { circle: { - borderRadius: 80, // big enough to cover all sizes + borderRadius: '$full', }, rounded: { - borderRadius: 16, + borderRadius: '$16', }, }, @@ -115,10 +115,10 @@ const Shape = styled(Stack, { variants: { shape: { circle: { - borderRadius: 80, // big enough to cover all sizes + borderRadius: '$full', }, rounded: { - borderRadius: 16, + borderRadius: '$16', }, }, }, @@ -131,7 +131,7 @@ const Indicator = styled(Stack, { zIndex: 2, borderWidth: 2, borderColor: '$white-100', - borderRadius: 10, + borderRadius: '$10', variants: { size: { diff --git a/packages/components/src/avatar/channel-avatar.tsx b/packages/components/src/avatar/channel-avatar.tsx index 377d452e..c8ad96b4 100644 --- a/packages/components/src/avatar/channel-avatar.tsx +++ b/packages/components/src/avatar/channel-avatar.tsx @@ -60,7 +60,7 @@ const LockBase = styled(Stack, { height: 16, backgroundColor: '$white-100', position: 'absolute', - borderRadius: 16, + borderRadius: '$16', variants: { variant: { diff --git a/packages/components/src/avatar/icon-avatar.tsx b/packages/components/src/avatar/icon-avatar.tsx index 945617d2..e972d577 100644 --- a/packages/components/src/avatar/icon-avatar.tsx +++ b/packages/components/src/avatar/icon-avatar.tsx @@ -24,7 +24,7 @@ const IconAvatar = (props: Props) => { } const Base = styled(Stack, { - borderRadius: 80, + borderRadius: '$full', justifyContent: 'center', alignItems: 'center', diff --git a/packages/components/src/button/button.tsx b/packages/components/src/button/button.tsx index 27d3cb9c..7f5f82b0 100644 --- a/packages/components/src/button/button.tsx +++ b/packages/components/src/button/button.tsx @@ -162,16 +162,16 @@ const Base = styled(Stack, { radius: { full: { - borderRadius: 40, + borderRadius: '$full', }, 40: { - borderRadius: 12, + borderRadius: '$12', }, 32: { - borderRadius: 10, + borderRadius: '$10', }, 24: { - borderRadius: 8, + borderRadius: '$8', }, }, diff --git a/packages/components/src/channel/channel.tsx b/packages/components/src/channel/channel.tsx index 9af9a530..dc8382fc 100644 --- a/packages/components/src/channel/channel.tsx +++ b/packages/components/src/channel/channel.tsx @@ -114,7 +114,7 @@ const Base = styled(Stack, { justifyContent: 'space-between', alignItems: 'center', padding: 8, - borderRadius: 12, + borderRadius: '$12', userSelect: 'none', variants: { diff --git a/packages/components/src/composer/composer.tsx b/packages/components/src/composer/composer.tsx index 9e52862c..ac1c847b 100644 --- a/packages/components/src/composer/composer.tsx +++ b/packages/components/src/composer/composer.tsx @@ -50,7 +50,7 @@ const Composer = (props: Props) => { @@ -143,7 +143,7 @@ const Composer = (props: Props) => { backgroundColor="$background" width={15} height={15} - borderRadius={7} + borderRadius="$8" position="absolute" zIndex={1} /> diff --git a/packages/components/src/context-tag/context-tag.tsx b/packages/components/src/context-tag/context-tag.tsx index 3eee5430..2aa3520d 100644 --- a/packages/components/src/context-tag/context-tag.tsx +++ b/packages/components/src/context-tag/context-tag.tsx @@ -98,7 +98,7 @@ export type { Props as ContextTagProps } const Base = styled(View, { backgroundColor: '$neutral-10', paddingVertical: 1, - borderRadius: 20, + borderRadius: '$20', display: 'inline-flex', flexDirection: 'row', alignItems: 'center', diff --git a/packages/components/src/counter/counter.tsx b/packages/components/src/counter/counter.tsx index a5965555..840b4d7f 100644 --- a/packages/components/src/counter/counter.tsx +++ b/packages/components/src/counter/counter.tsx @@ -16,10 +16,12 @@ const Counter = (props: Props) => { const { value, type = 'default' } = props return ( - - - {value > 99 ? '99+' : value} - + + + + {value > 99 ? '99+' : value} + + ) } @@ -28,17 +30,24 @@ export { Counter } export type { Props as CounterProps } const Base = styled(View, { - backgroundColor: '$primary-50', - paddingHorizontal: 3, - paddingVertical: 0, - borderRadius: 6, // TODO: use tokens when fixed its definition - height: 16, - minWidth: 16, - maxWidth: 28, + padding: 2, display: 'inline-flex', justifyContent: 'center', alignItems: 'center', flexBasis: 'fit-content', +}) + +const Content = styled(View, { + backgroundColor: '$primary-50', + paddingHorizontal: 3, + paddingVertical: 0, + borderRadius: '$6', + minHeight: 16, + maxHeight: 16, + minWidth: 16, + maxWidth: 28, + justifyContent: 'center', + alignItems: 'center', borderWidth: 1, borderColor: 'transparent', diff --git a/packages/components/src/dialog/dialog.stories.tsx b/packages/components/src/dialog/dialog.stories.tsx index b616533f..7f8ed71e 100644 --- a/packages/components/src/dialog/dialog.stories.tsx +++ b/packages/components/src/dialog/dialog.stories.tsx @@ -25,7 +25,7 @@ export const Default: Story = { - + test diff --git a/packages/components/src/dialog/dialog.tsx b/packages/components/src/dialog/dialog.tsx index 306dda0f..82b5c4c8 100644 --- a/packages/components/src/dialog/dialog.tsx +++ b/packages/components/src/dialog/dialog.tsx @@ -73,7 +73,7 @@ const PressableTrigger = forwardRef(function _PressableTrigger( interface DialogContentProps { children: React.ReactNode - borderRadius: 8 | 12 | 16 + borderRadius: '$8' | '$12' | '$16' width: number initialFocusRef?: React.RefObject } diff --git a/packages/components/src/dropdown-menu/dropdown-menu.tsx b/packages/components/src/dropdown-menu/dropdown-menu.tsx index 8621706e..53e5b511 100644 --- a/packages/components/src/dropdown-menu/dropdown-menu.tsx +++ b/packages/components/src/dropdown-menu/dropdown-menu.tsx @@ -60,7 +60,7 @@ const Content = styled(DropdownMenuContent, { width: 256, padding: 4, - borderRadius: 12, + borderRadius: '$12', backgroundColor: '$white-100', shadowRadius: 30, @@ -76,7 +76,7 @@ const ItemBase = styled(DropdownMenuItem, { alignItems: 'center', height: 32, paddingHorizontal: 8, - borderRadius: 10, + borderRadius: '$10', cursor: 'pointer', userSelect: 'none', gap: 8, diff --git a/packages/components/src/dynamic-button/dynamic-button.tsx b/packages/components/src/dynamic-button/dynamic-button.tsx index 090feb40..bf7a4e28 100644 --- a/packages/components/src/dynamic-button/dynamic-button.tsx +++ b/packages/components/src/dynamic-button/dynamic-button.tsx @@ -24,7 +24,7 @@ const DynamicButton = (props: Props, ref: Ref) => { const showCount = Boolean(count) return ( - +