You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

get-icon.ts 301B

12345678910
  1. import { DataType } from '../types'
  2. import { RiHashtag, RiTextSnippet, RiTimeLine } from '@remixicon/react'
  3. export const getIcon = (type: DataType) => {
  4. return ({
  5. [DataType.string]: RiTextSnippet,
  6. [DataType.number]: RiHashtag,
  7. [DataType.time]: RiTimeLine,
  8. }[type] || RiTextSnippet)
  9. }