import { clsx } from 'clsx'; import { ReactNode } from 'react'; import { Sentiment, Size } from '../common'; import StatusIcon from '../statusIcon'; import Body from '../body'; export interface InlineAlertProps { id?: string; type?: `${Sentiment}`; iconLabel?: string; className?: string; children: ReactNode; } const iconTypes = new Set>([ Sentiment.NEGATIVE, Sentiment.ERROR, Sentiment.POSITIVE, Sentiment.SUCCESS, Sentiment.WARNING, ]); /** * @deprecated Use [](https://storybook.wise.design/?path=/docs/prompts-inlineprompt--docs) or [](https://storybook.wise.design/?path=/docs/forms-field--docs) instead. */ export default function InlineAlert({ id, type = 'neutral', iconLabel, className, children, }: InlineAlertProps) { return ( {iconTypes.has(type) && ( )}
{children}
); }