Skip to content

Commit

Permalink
tag theme fix
Browse files Browse the repository at this point in the history
  • Loading branch information
isstuev committed Jun 23, 2024
1 parent c9157c2 commit f487cf1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions theme/components/Tag/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,13 @@ const variants = {
color: 'blue.400',
opacity: 0.76,
},
},
})),
selectActive: definePartsStyle((props) => ({
container: {
bg: mode('blue.500', 'blue.900')(props),
color: 'whiteAlpha.800',
[`
&[data-selected=true],
&[data-selected=true][aria-selected=true]
`]: {
bg: mode('blue.500', 'blue.900')(props),
color: 'whiteAlpha.800',
},
},
})),
};
Expand Down
5 changes: 3 additions & 2 deletions ui/shared/tagGroupSelect/TagGroupSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ const TagGroupSelect = <T extends string>({ items, value, isMulti, onChange }: P
return (
<HStack>
{ items.map(item => {
const isActive = isMulti ? value.includes(item.id) : value === item.id;
const isSelected = isMulti ? value.includes(item.id) : value === item.id;
return (
<Tag
variant="select"
key={ item.id }
data-id={ item.id }
variant={ isActive ? 'selectActive' : 'select' }
data-selected={ isSelected }
fontWeight={ 500 }
cursor="pointer"
onClick={ onItemClick }
Expand Down

0 comments on commit f487cf1

Please sign in to comment.