/********************************************************************* * © Copyright IBM Corp. 2024 *********************************************************************/ import React from 'react' import PropTypes from 'prop-types' import {IconsGeneralColor} from '@targetprocess/css-variables' export const Types = { DEFAULT: 'default', CROSSOUT: 'crossout' } as const export const Sizes = { DEFAULT: 'default', BIG: 'big' } as const const defaultColor = '#B4900E' export const OwnerIcon = ({ color, type = Types.DEFAULT as typeof Types[keyof typeof Types], size = Sizes.DEFAULT as typeof Sizes[keyof typeof Sizes] }) => ( {type === Types.DEFAULT && size === Sizes.DEFAULT && ( )} {type === Types.DEFAULT && size === Sizes.BIG && ( )} {type === Types.CROSSOUT && size === Sizes.DEFAULT && ( )} {type === Types.CROSSOUT && size === Sizes.BIG && ( )} ) OwnerIcon.category = 'Entity' OwnerIcon.propTypes = { // Object.keys used here // eslint-disable-next-line security/detect-object-injection type: PropTypes.oneOf(Object.keys(Types).map(key => Types[key])), // eslint-disable-next-line security/detect-object-injection size: PropTypes.oneOf(Object.keys(Sizes).map(key => Sizes[key])), color: PropTypes.string } OwnerIcon.Types = Types OwnerIcon.Sizes = Sizes