Commit f487cf10 authored by isstuev's avatar isstuev

tag theme fix

parent c9157c28
...@@ -25,12 +25,13 @@ const variants = { ...@@ -25,12 +25,13 @@ const variants = {
color: 'blue.400', color: 'blue.400',
opacity: 0.76, opacity: 0.76,
}, },
}, [`
})), &[data-selected=true],
selectActive: definePartsStyle((props) => ({ &[data-selected=true][aria-selected=true]
container: { `]: {
bg: mode('blue.500', 'blue.900')(props), bg: mode('blue.500', 'blue.900')(props),
color: 'whiteAlpha.800', color: 'whiteAlpha.800',
},
}, },
})), })),
}; };
......
...@@ -34,12 +34,13 @@ const TagGroupSelect = <T extends string>({ items, value, isMulti, onChange }: P ...@@ -34,12 +34,13 @@ const TagGroupSelect = <T extends string>({ items, value, isMulti, onChange }: P
return ( return (
<HStack> <HStack>
{ items.map(item => { { items.map(item => {
const isActive = isMulti ? value.includes(item.id) : value === item.id; const isSelected = isMulti ? value.includes(item.id) : value === item.id;
return ( return (
<Tag <Tag
variant="select"
key={ item.id } key={ item.id }
data-id={ item.id } data-id={ item.id }
variant={ isActive ? 'selectActive' : 'select' } data-selected={ isSelected }
fontWeight={ 500 } fontWeight={ 500 }
cursor="pointer" cursor="pointer"
onClick={ onItemClick } onClick={ onItemClick }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment