import Box from '../Box'; import Flex from '../Flex'; import Heading from '../Heading'; import Icon from '../Icon'; import IconButton from '../IconButton'; const ICON_COLOR_MAP = { error: { icon: 'workflow-status-problem', color: 'error', }, warning: { icon: 'workflow-status-warning', color: 'warning', }, } as const; type Props = { accessibilityDismissButtonLabel: string; type: 'default' | 'warning' | 'error'; heading: string; onDismiss: () => void; }; export default function ModalAlertHeader({ accessibilityDismissButtonLabel, type, heading, onDismiss, }: Props) { return ( {type !== 'default' && ( )} {heading} {type === 'default' && ( )} ); }