dify/web/app/components/datasets/metadata/utils/get-icon.ts
zhangxuhe1 cd4d6f8a22
fix(web): migrate metadata picker to combobox (#36255)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-05-17 03:35:20 +00:00

12 lines
355 B
TypeScript

import { DataType } from '../types'
const metadataTypeIconClassMap: Record<DataType, string> = {
[DataType.string]: 'i-ri-text-snippet',
[DataType.number]: 'i-ri-hashtag',
[DataType.time]: 'i-ri-time-line',
}
export function getIconClassName(type: DataType) {
return metadataTypeIconClassMap[type] ?? metadataTypeIconClassMap[DataType.string]
}