Sha256: 7bbd4cd33030bede0b8087ec103171b878cced1e562c5f3191ad8405f0aca252
Contents?: true
Size: 773 Bytes
Versions: 18
Compression:
Stored size: 773 Bytes
Contents
import React from 'react'; import { Tooltip } from '@patternfly/react-core'; import { BundleIcon, MiddlewareIcon, BoxIcon, CodeBranchIcon, FanIcon, TenantIcon, AnsibleTowerIcon } from '@patternfly/react-icons'; import PropTypes from 'prop-types'; const RepoIcon = ({ type }) => { const iconMap = { yum: BundleIcon, docker: MiddlewareIcon, ostree: CodeBranchIcon, file: TenantIcon, deb: FanIcon, ansible_collection: AnsibleTowerIcon, }; const Icon = iconMap[type] || BoxIcon; return <Tooltip content={<div>{type}</div>}><Icon aria-label={`${type}_type_icon`} /></Tooltip>; }; RepoIcon.propTypes = { type: PropTypes.string, }; RepoIcon.defaultProps = { type: '', // prevent errors if data isn't loaded yet }; export default RepoIcon;
Version data entries
18 entries across 18 versions & 1 rubygems