mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 23:06:15 +08:00
fix: style of category in explore
This commit is contained in:
parent
8e37bdf342
commit
7f3fc0948d
@ -31,8 +31,8 @@ const Category: FC<ICategoryProps> = ({
|
|||||||
const isAllCategories = !list.includes(value as AppCategory) || value === allCategoriesEn
|
const isAllCategories = !list.includes(value as AppCategory) || value === allCategoriesEn
|
||||||
|
|
||||||
const itemClassName = (isSelected: boolean) => cn(
|
const itemClassName = (isSelected: boolean) => cn(
|
||||||
'flex h-[32px] cursor-pointer items-center rounded-lg border-[0.5px] border-transparent px-3 py-[7px] font-medium leading-[18px] text-gray-700 hover:bg-gray-200',
|
'flex h-[32px] cursor-pointer items-center rounded-lg border-[0.5px] border-transparent px-3 py-[7px] font-medium leading-[18px] text-text-tertiary hover:bg-components-main-nav-nav-button-bg-active',
|
||||||
isSelected && 'border-gray-200 bg-white text-primary-600 shadow-xs hover:bg-white',
|
isSelected && 'border-components-main-nav-nav-button-border bg-components-main-nav-nav-button-bg-active text-components-main-nav-nav-button-text-active shadow-xs',
|
||||||
)
|
)
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -50,7 +50,7 @@ const Category: FC<ICategoryProps> = ({
|
|||||||
className={itemClassName(name === value)}
|
className={itemClassName(name === value)}
|
||||||
onClick={() => onChange(name)}
|
onClick={() => onChange(name)}
|
||||||
>
|
>
|
||||||
{categoryI18n[name] ? t(`explore.category.${name}`) : name}
|
{(categoryI18n as any)[name] ? t(`explore.category.${name}`) : name}
|
||||||
</div>
|
</div>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user