import type { FC } from 'react'; import classNames from 'classnames'; import CheckIcon from '@/material-icons/400-24px/check.svg?react'; import ErrorIcon from '@/material-icons/400-24px/error.svg?react'; import InfoIcon from '@/material-icons/400-24px/info.svg?react'; import WarningIcon from '@/material-icons/400-24px/warning.svg?react'; import { Icon } from '../icon'; import classes from './styles.module.css'; export interface FieldStatus { variant: 'error' | 'warning' | 'info' | 'success'; message?: string; } const iconMap: Record = { error: ErrorIcon, warning: WarningIcon, info: InfoIcon, success: CheckIcon, }; export const CalloutInline: FC< Partial & React.ComponentPropsWithoutRef<'div'> > = ({ variant = 'error', message, className, children, ...props }) => { return (
{message ?? children}
); };