/********************************************************************* * © 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 UserIcon = ({ color = IconsGeneralColor, type = Types.DEFAULT as typeof Types[keyof typeof Types] }) => ( {type === Types.DEFAULT && ( )} {type === Types.CROSSOUT && ( )} ) UserIcon.category = 'Entity' UserIcon.propTypes = { // Object.keys used here // eslint-disable-next-line security/detect-object-injection type: PropTypes.oneOf(Object.keys(Types).map(key => Types[key])), color: PropTypes.string } UserIcon.Types = Types