fix: make TagSelector always visible for accessibility and mobile support (#23515)

This commit is contained in:
lyzno1 2025-08-07 09:25:26 +08:00 • committed by GitHub
commit f6c7175828
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 19 additions and 26 deletions

View file

@ -238,12 +238,16 @@ const TagSelector: FC<TagSelectorProps> = ({
}, [selectedTags, tagList])
const Trigger = () => {
const hasNoTags = !triggerContent
return (
<div className={cn(
'group/tip relative flex w-full cursor-pointer items-center gap-1 rounded-md px-2 py-[7px] hover:bg-state-base-hover',
)}>
<Tag01 className='h-3 w-3 shrink-0 text-components-input-text-placeholder' />
<div className='system-sm-regular grow truncate text-start text-components-input-text-placeholder'>
<div className={cn(
'system-sm-regular grow truncate text-start',
hasNoTags ? 'italic text-components-input-text-placeholder' : 'font-medium text-components-input-text-placeholder',
)}>
{!triggerContent ? t('common.tag.addTag') : triggerContent}
</div>
</div>