mirror of
https://github.com/langgenius/dify.git
synced 2026-06-09 01:11:11 +08:00
12 lines
355 B
TypeScript
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]
|
|
}
|