import React, { Fragment } from 'react' import { color } from '../branding' import { BaseIcon } from '../icon' import { BaseIconDefaultProps, IconProps } from '../icon/BaseIcon' export enum status { ON = 'on', OFF = 'off', DEFAULT = 'default', } export type StatusIconProps = IconProps & Readonly<{ status?: status }> export type IconPropsWithStatus = Omit export const StatusIcon = (props: StatusIconProps) => { const finalProps = { ...props, iconColor: props.status === status.ON ? color.midnightGreen : props.iconColor, } return ( {props.children} {props.status === status.OFF && ( )} ) } StatusIcon.defaultProps = { ...BaseIconDefaultProps, status: status.DEFAULT, }