Icons.tsx 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  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 PersonOutlineIcon from '@material-ui/icons/PersonOutline';
  28. import PersonOutlineIcon from '@material-ui/icons/Person';
  29. import { SvgIcon } from '@material-ui/core';
  30. import { ReactComponent as ZillizIcon } from '../../assets/icons/attu.svg';
  31. import { ReactComponent as OverviewIcon } from '../../assets/icons/overview.svg';
  32. import { ReactComponent as CollectionIcon } from '../../assets/icons/collecion.svg';
  33. import { ReactComponent as ConsoleIcon } from '../../assets/icons/console.svg';
  34. import { ReactComponent as InfoIcon } from '../../assets/icons/info.svg';
  35. import { ReactComponent as ReleaseIcon } from '../../assets/icons/release.svg';
  36. import { ReactComponent as LoadIcon } from '../../assets/icons/load.svg';
  37. import { ReactComponent as KeyIcon } from '../../assets/icons/key.svg';
  38. import { ReactComponent as UploadIcon } from '../../assets/icons/upload.svg';
  39. import { ReactComponent as VectorSearchIcon } from '../../assets/icons/nav-search.svg';
  40. import { ReactComponent as SearchEmptyIcon } from '../../assets/icons/search.svg';
  41. import { ReactComponent as CopyIcon } from '../../assets/icons/copy.svg';
  42. import { ReactComponent as SystemIcon } from '../../assets/icons/system.svg';
  43. const icons: { [x in IconsType]: (props?: any) => React.ReactElement } = {
  44. search: (props = {}) => <SearchIcon {...props} />,
  45. add: (props = {}) => <AddIcon {...props} />,
  46. delete: (props = {}) => <DeleteIcon {...props} />,
  47. list: (props = {}) => <ReorderIcon {...props} />,
  48. copy: (props = {}) => <FileCopyIcon {...props} />,
  49. visible: (props = {}) => <Visibility {...props} />,
  50. invisible: (props = {}) => <VisibilityOff {...props} />,
  51. error: (props = {}) => <CancelIcon {...props} />,
  52. clear: (props = {}) => <ClearIcon {...props} />,
  53. more: (props = {}) => <MoreVertIcon {...props} />,
  54. app: (props = {}) => <AppsIcon {...props} />,
  55. success: (props = {}) => <CheckCircleIcon {...props} />,
  56. expandLess: (props = {}) => <ExpandLess {...props} />,
  57. expandMore: (props = {}) => <ExpandMore {...props} />,
  58. back: (props = {}) => <ArrowBackIosIcon {...props} />,
  59. logout: (props = {}) => <ExitToAppIcon {...props} />,
  60. rightArrow: (props = {}) => <ArrowForwardIosIcon {...props} />,
  61. remove: (props = {}) => <RemoveCircleOutlineIcon {...props} />,
  62. dropdown: (props = {}) => <ArrowDropDownIcon {...props} />,
  63. refresh: (props = {}) => <CachedIcon {...props} />,
  64. filter: (props = {}) => <FilterListIcon {...props} />,
  65. alias: (props = {}) => <AlternateEmailIcon {...props} />,
  66. datePicker: (props = {}) => <DatePicker {...props} />,
  67. download: (props = {}) => <GetAppIcon {...props} />,
  68. zilliz: (props = {}) => (
  69. <SvgIcon viewBox="0 0 36 36" component={ZillizIcon} {...props} />
  70. ),
  71. navPerson: (props = {}) => (
  72. <SvgIcon
  73. viewBox="0 0 24 24"
  74. component={PersonOutlineIcon}
  75. strokeWidth="2"
  76. {...props}
  77. />
  78. ),
  79. navOverview: (props = {}) => (
  80. <SvgIcon viewBox="0 0 20 20" component={OverviewIcon} {...props} />
  81. ),
  82. navCollection: (props = {}) => (
  83. <SvgIcon viewBox="0 0 20 20" component={CollectionIcon} {...props} />
  84. ),
  85. navConsole: (props = {}) => (
  86. <SvgIcon viewBox="0 0 20 20" component={ConsoleIcon} {...props} />
  87. ),
  88. navSearch: (props = {}) => (
  89. <SvgIcon viewBox="0 0 20 20" component={VectorSearchIcon} {...props} />
  90. ),
  91. navSystem: (props = {}) => (
  92. <SvgIcon viewBox="0 0 20 20" component={SystemIcon} {...props} />
  93. ),
  94. info: (props = {}) => (
  95. <SvgIcon viewBox="0 0 16 16" component={InfoIcon} {...props} />
  96. ),
  97. release: (props = {}) => (
  98. <SvgIcon viewBox="0 0 16 16" component={ReleaseIcon} {...props} />
  99. ),
  100. load: (props = {}) => (
  101. <SvgIcon viewBox="0 0 24 24" component={LoadIcon} {...props} />
  102. ),
  103. key: (props = {}) => (
  104. <SvgIcon viewBox="0 0 16 16" component={KeyIcon} {...props} />
  105. ),
  106. upload: (props = {}) => (
  107. <SvgIcon viewBox="0 0 16 16" component={UploadIcon} {...props} />
  108. ),
  109. vectorSearch: (props = {}) => (
  110. <SvgIcon viewBox="0 0 48 48" component={SearchEmptyIcon} {...props} />
  111. ),
  112. copyExpression: (props = {}) => (
  113. <SvgIcon viewBox="0 0 16 16" component={CopyIcon} {...props} />
  114. ),
  115. };
  116. export default icons;