Files
verdaccio/website/src/components/EcosystemSearch/Icon.tsx
Juan Picado 3d158a195a chore(website): plugin search ui (#3539)
* chore: plugin search ui

chore: progress

chore: format code

chore: progress

chore: @verdaccio-ui/copy-clipboard

chore: search finish

* chore: ui-components

* Update ToolList.tsx

* xss protection

* Update static-data.yml

* Update AddonCard.tsx
2022-12-25 18:48:18 +01:00

30 lines
986 B
TypeScript

import AltRouteIcon from '@mui/icons-material/AltRoute';
import ColorLensIcon from '@mui/icons-material/ColorLens';
import FilterAltIcon from '@mui/icons-material/FilterAlt';
import HandymanIcon from '@mui/icons-material/Handyman';
import HubIcon from '@mui/icons-material/Hub';
import SecurityIcon from '@mui/icons-material/Security';
import StorageIcon from '@mui/icons-material/Storage';
import * as React from 'react';
import { FC } from 'react';
const Icon: FC<{ category: string }> = ({ category }): React.ReactElement => {
if (category === 'middleware') {
return <AltRouteIcon />;
} else if (category === 'storage') {
return <StorageIcon />;
} else if (category === 'tool') {
return <HandymanIcon />;
} else if (category === 'filter') {
return <FilterAltIcon />;
} else if (category === 'authentication') {
return <SecurityIcon />;
} else if (category === 'ui') {
return <ColorLensIcon />;
}
return <HubIcon />;
};
export default Icon;