From db7dc5a8e49ff339c648d6effa8176642c7d4254 Mon Sep 17 00:00:00 2001 From: Gerard Date: Thu, 28 Nov 2024 16:14:11 +0100 Subject: [PATCH] fixed issues --- src/theme/components/tag.ts | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/theme/components/tag.ts b/src/theme/components/tag.ts index 45b47d95..7d2db6c9 100644 --- a/src/theme/components/tag.ts +++ b/src/theme/components/tag.ts @@ -3,13 +3,17 @@ import { createMultiStyleConfigHelpers, defineStyle } from '@chakra-ui/react' const { definePartsStyle, defineMultiStyleConfig } = createMultiStyleConfigHelpers(tagAnatomy.keys) -const baseStyle = definePartsStyle({ - container: { - borderRadius: 6, - border: '1px solid', - borderColor: 'tag.border', - width: 'fit-content', - }, +const baseStyle = defineStyle((props) => { + const { colorScheme } = props + + return { + container: { + borderRadius: 6, + border: '1px solid', + borderColor: `${colorScheme}.200`, + width: 'auto', + }, + } }) -export const Tag = defineMultiStyleConfig({ baseStyle }) +export const Tag = defineMultiStyleConfig({ baseStyle, defaultProps: { colorScheme: 'brand' } })