import { Box, Icon } from '@rocket.chat/fuselage'; import React, { ComponentProps, ReactElement, ReactNode } from 'react'; type CardIconProps = { children: ReactNode } | ComponentProps; const hasChildrenProp = (props: CardIconProps): props is { children: ReactNode } => 'children' in props; const CardIcon = (props: CardIconProps): ReactElement => ( {hasChildrenProp(props) ? props.children : } ); export default CardIcon;