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