File size: 622 Bytes
f46e223
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import {
  AudioOutlined, FileImageOutlined,
  FileOutlined,
  FilePdfOutlined,
  FolderOpenOutlined, VideoCameraOutlined
} from '@ant-design/icons'
import React from 'react'

const Icon: React.FC<{ type: string }> = ({ type }) => {
  if (type === 'image') {
    return <FileImageOutlined />
  } else if (type === 'video') {
    return <VideoCameraOutlined />
  } else if (type === 'document') {
    return <FilePdfOutlined />
  } else if (type === 'folder') {
    return <FolderOpenOutlined />
  } else if (type === 'audio') {
    return <AudioOutlined />
  } else {
    return <FileOutlined />
  }
}

export default Icon