11 lines
301 B
TypeScript
11 lines
301 B
TypeScript
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)
|
|
}
|