dify
This commit is contained in:
10
dify/web/app/components/datasets/metadata/utils/get-icon.ts
Normal file
10
dify/web/app/components/datasets/metadata/utils/get-icon.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { DataType } from '../types'
|
||||
import { RiHashtag, RiTextSnippet, RiTimeLine } from '@remixicon/react'
|
||||
|
||||
export const getIcon = (type: DataType) => {
|
||||
return ({
|
||||
[DataType.string]: RiTextSnippet,
|
||||
[DataType.number]: RiHashtag,
|
||||
[DataType.time]: RiTimeLine,
|
||||
}[type] || RiTextSnippet)
|
||||
}
|
||||
Reference in New Issue
Block a user