UNPKG

@payfit/unity-components

Version:

32 lines (31 loc) • 1.52 kB
import { ComponentPropsWithoutRef, ReactNode } from 'react'; export interface AIComposerAlertProps extends Omit<ComponentPropsWithoutRef<'div'>, 'children' | 'className'> { /** Renders the actionable feedback message. */ children: ReactNode; /** Selects the visual treatment and live-region priority. */ variant: 'warning' | 'error'; /** Adds layout styling to the feedback region. */ className?: string; } /** * Explains what needs attention without making people lose the prompt they * have already written. * * Render it below `AIComposerTextArea` when the request needs feedback. Set * `variant="warning"` for non-blocking guidance and `variant="error"` when a * person must resolve a problem before continuing. * @param props - Feedback content and its severity variant. * @param props.children - Renders the actionable feedback message. * @param props.variant - Selects warning or error semantics and treatment. * @param props.className - Adds consumer styling to the alert region. * @see {@link AIComposerAlertProps} for all available props. * @remarks * Warnings render `role="status"` with a polite announcement. Errors render * `role="alert"` with an assertive announcement. Connect validation errors to * the prompt with `aria-describedby` and `aria-invalid` on * `AIComposerTextArea`. */ export declare const AIComposerAlert: { ({ children, variant, className, ...props }: AIComposerAlertProps): import('react/jsx-runtime').JSX.Element; displayName: string; };