import { type RefAttributes } from 'react'; import { InlineMessageSeverity } from '@mezzanine-ui/core/inline-message'; import { IconDefinition } from '@mezzanine-ui/icons'; import { NativeElementPropsWithoutKeyAndRef } from '../utils/jsx-types'; export interface InlineMessageProps extends NativeElementPropsWithoutKeyAndRef<'div'> { /** * The content of the inline message value(only string is supported). */ content: string; /** * The class name of the inline message element. */ className?: string; /** * The icon of the inline message. */ icon?: IconDefinition; /** * Called when user clicks the close button. */ onClose?: () => void; /** * The inline message severity (`'info' | 'warning' | 'error'`). */ severity: InlineMessageSeverity; } /** * The react component for `mezzanine` inline message. * * Use `InlineMessage` directly in your layout to display contextual feedback, * and provide `onClose` callback when you need to react to dismiss events. * * The root element defaults to `role="status"` with `aria-live="polite"` and * spreads any other DOM prop you pass. Both defaults are overridable — pass * `aria-live="assertive"` when a failure needs to interrupt rather than queue. * * @example * ```tsx * import InlineMessage from '@mezzanine-ui/react/InlineMessage'; * * // 一般提示(排隊播報) * * * // 破壞性操作失敗,需要插播 * * ``` */ declare function InlineMessage({ ref, ...props }: InlineMessageProps & RefAttributes): import("react/jsx-runtime").JSX.Element; export default InlineMessage;