mirror of
https://github.com/langgenius/dify.git
synced 2026-05-06 02:18:08 +08:00
app templates
This commit is contained in:
@ -23,13 +23,15 @@ const Category: FC<ICategoryProps> = ({
|
||||
}) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
const itemClassName = (isSelected: boolean) => cn(isSelected ? 'bg-white text-primary-600 border-gray-200 font-semibold' : 'border-transparent font-medium', 'flex items-center h-7 px-3 border cursor-pointer rounded-lg')
|
||||
const itemStyle = (isSelected: boolean) => isSelected ? { boxShadow: '0px 1px 2px rgba(16, 24, 40, 0.05)' } : {}
|
||||
const itemClassName = (isSelected: boolean) => cn(
|
||||
'px-3 py-[5px] h-[28px] rounded-lg border-[0.5px] border-transparent text-gray-700 font-medium leading-[18px] cursor-pointer hover:bg-gray-200',
|
||||
isSelected && 'bg-white border-gray-200 shadow-xs text-primary-600 hover:bg-white',
|
||||
)
|
||||
|
||||
return (
|
||||
<div className={cn(className, 'flex space-x-1 text-[13px] flex-wrap')}>
|
||||
<div
|
||||
className={itemClassName(value === '')}
|
||||
style={itemStyle(value === '')}
|
||||
onClick={() => onChange('')}
|
||||
>
|
||||
{t('explore.apps.allCategories')}
|
||||
@ -38,7 +40,6 @@ const Category: FC<ICategoryProps> = ({
|
||||
<div
|
||||
key={name}
|
||||
className={itemClassName(name === value)}
|
||||
style={itemStyle(name === value)}
|
||||
onClick={() => onChange(name)}
|
||||
>
|
||||
{categoryI18n[name] ? t(`explore.category.${name}`) : name}
|
||||
|
||||
Reference in New Issue
Block a user