Icons.tsx 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. import React from 'react';
  2. import { IconsType } from './Types';
  3. import SearchIcon from '@material-ui/icons/Search';
  4. import AddIcon from '@material-ui/icons/Add';
  5. import DeleteIcon from '@material-ui/icons/Delete';
  6. import FileCopyIcon from '@material-ui/icons/FileCopy';
  7. import Visibility from '@material-ui/icons/Visibility';
  8. import VisibilityOff from '@material-ui/icons/VisibilityOff';
  9. import ClearIcon from '@material-ui/icons/Clear';
  10. import ReorderIcon from '@material-ui/icons/Reorder';
  11. import AppsIcon from '@material-ui/icons/Apps';
  12. import MoreVertIcon from '@material-ui/icons/MoreVert';
  13. import CancelIcon from '@material-ui/icons/Cancel';
  14. import CheckCircleIcon from '@material-ui/icons/CheckCircle';
  15. import ExpandLess from '@material-ui/icons/ExpandLess';
  16. import ExpandMore from '@material-ui/icons/ExpandMore';
  17. import ArrowBackIosIcon from '@material-ui/icons/ArrowBackIos';
  18. import ExitToAppIcon from '@material-ui/icons/ExitToApp';
  19. import ArrowForwardIosIcon from '@material-ui/icons/ArrowForwardIos';
  20. import RemoveCircleOutlineIcon from '@material-ui/icons/RemoveCircleOutline';
  21. import ArrowDropDownIcon from '@material-ui/icons/ArrowDropDown';
  22. import CachedIcon from '@material-ui/icons/Cached';
  23. import FilterListIcon from '@material-ui/icons/FilterList';
  24. import AlternateEmailIcon from '@material-ui/icons/AlternateEmail';
  25. import DatePicker from '@material-ui/icons/Event';
  26. import GetAppIcon from '@material-ui/icons/GetApp';
  27. import { SvgIcon } from '@material-ui/core';
  28. import { ReactComponent as MilvusIcon } from '../../assets/icons/milvus.svg';
  29. import { ReactComponent as OverviewIcon } from '../../assets/icons/overview.svg';
  30. import { ReactComponent as CollectionIcon } from '../../assets/icons/collecion.svg';
  31. import { ReactComponent as ConsoleIcon } from '../../assets/icons/console.svg';
  32. import { ReactComponent as InfoIcon } from '../../assets/icons/info.svg';
  33. import { ReactComponent as ReleaseIcon } from '../../assets/icons/release.svg';
  34. import { ReactComponent as LoadIcon } from '../../assets/icons/load.svg';
  35. import { ReactComponent as KeyIcon } from '../../assets/icons/key.svg';
  36. import { ReactComponent as UploadIcon } from '../../assets/icons/upload.svg';
  37. import { ReactComponent as VectorSearchIcon } from '../../assets/icons/nav-search.svg';
  38. import { ReactComponent as SearchEmptyIcon } from '../../assets/icons/search.svg';
  39. import { ReactComponent as CopyIcon } from '../../assets/icons/copy.svg';
  40. import { ReactComponent as SystemIcon } from '../../assets/icons/system.svg';
  41. const icons: { [x in IconsType]: (props?: any) => React.ReactElement } = {
  42. search: (props = {}) => <SearchIcon {...props} />,
  43. add: (props = {}) => <AddIcon {...props} />,
  44. delete: (props = {}) => <DeleteIcon {...props} />,
  45. list: (props = {}) => <ReorderIcon {...props} />,
  46. copy: (props = {}) => <FileCopyIcon {...props} />,
  47. visible: (props = {}) => <Visibility {...props} />,
  48. invisible: (props = {}) => <VisibilityOff {...props} />,
  49. error: (props = {}) => <CancelIcon {...props} />,
  50. clear: (props = {}) => <ClearIcon {...props} />,
  51. more: (props = {}) => <MoreVertIcon {...props} />,
  52. app: (props = {}) => <AppsIcon {...props} />,
  53. success: (props = {}) => <CheckCircleIcon {...props} />,
  54. expandLess: (props = {}) => <ExpandLess {...props} />,
  55. expandMore: (props = {}) => <ExpandMore {...props} />,
  56. back: (props = {}) => <ArrowBackIosIcon {...props} />,
  57. logout: (props = {}) => <ExitToAppIcon {...props} />,
  58. rightArrow: (props = {}) => <ArrowForwardIosIcon {...props} />,
  59. remove: (props = {}) => <RemoveCircleOutlineIcon {...props} />,
  60. dropdown: (props = {}) => <ArrowDropDownIcon {...props} />,
  61. refresh: (props = {}) => <CachedIcon {...props} />,
  62. filter: (props = {}) => <FilterListIcon {...props} />,
  63. alias: (props = {}) => <AlternateEmailIcon {...props} />,
  64. datePicker: (props = {}) => <DatePicker {...props} />,
  65. download: (props = {}) => <GetAppIcon {...props} />,
  66. milvus: (props = {}) => (
  67. <SvgIcon viewBox="0 0 44 31" component={MilvusIcon} {...props} />
  68. ),
  69. navOverview: (props = {}) => (
  70. <SvgIcon viewBox="0 0 20 20" component={OverviewIcon} {...props} />
  71. ),
  72. navCollection: (props = {}) => (
  73. <SvgIcon viewBox="0 0 20 20" component={CollectionIcon} {...props} />
  74. ),
  75. navConsole: (props = {}) => (
  76. <SvgIcon viewBox="0 0 20 20" component={ConsoleIcon} {...props} />
  77. ),
  78. navSearch: (props = {}) => (
  79. <SvgIcon viewBox="0 0 20 20" component={VectorSearchIcon} {...props} />
  80. ),
  81. navSystem: (props = {}) => (
  82. <SvgIcon viewBox="0 0 20 20" component={SystemIcon} {...props} />
  83. ),
  84. info: (props = {}) => (
  85. <SvgIcon viewBox="0 0 16 16" component={InfoIcon} {...props} />
  86. ),
  87. release: (props = {}) => (
  88. <SvgIcon viewBox="0 0 16 16" component={ReleaseIcon} {...props} />
  89. ),
  90. load: (props = {}) => (
  91. <SvgIcon viewBox="0 0 24 24" component={LoadIcon} {...props} />
  92. ),
  93. key: (props = {}) => (
  94. <SvgIcon viewBox="0 0 16 16" component={KeyIcon} {...props} />
  95. ),
  96. upload: (props = {}) => (
  97. <SvgIcon viewBox="0 0 16 16" component={UploadIcon} {...props} />
  98. ),
  99. vectorSearch: (props = {}) => (
  100. <SvgIcon viewBox="0 0 48 48" component={SearchEmptyIcon} {...props} />
  101. ),
  102. copyExpression: (props = {}) => (
  103. <SvgIcon viewBox="0 0 16 16" component={CopyIcon} {...props} />
  104. ),
  105. };
  106. export default icons;