Skip to content

Commit

Permalink
fixed issues
Browse files Browse the repository at this point in the history
  • Loading branch information
gerouvi committed Nov 28, 2024
1 parent 4452684 commit db7dc5a
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions src/theme/components/tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' } })

0 comments on commit db7dc5a

Please sign in to comment.