UNPKG

@amsterdam/design-system-react

Version:

All React components from the Amsterdam Design System. Use it to compose pages in your website or application.

50 lines (49 loc) 2.04 kB
/** * @license EUPL-1.2+ * Copyright Gemeente Amsterdam */ import type { HTMLAttributes, PropsWithChildren } from 'react'; import type { HeadingProps } from '../Heading'; type Severity = 'error' | 'success' | 'warning'; export type AlertProps = { /** Whether the user can dismiss the Alert. Adds a button to its top right. */ closeable?: boolean; /** The label for the button that dismisses the Alert. */ closeButtonLabel?: string; /** The text for the Heading. */ heading: string; /** * The hierarchical level of the Alert’s Heading within the document. * There is no default value; determine the correct level for each instance. * Note: this intentionally does not change the font size. **/ headingLevel: HeadingProps['level']; /** A function to run when dismissing. */ onClose?: () => void; /** The significance of the message conveyed. */ severity?: Severity; } & PropsWithChildren<HTMLAttributes<HTMLDivElement>>; /** * @see {@link https://designsystem.amsterdam/?path=/docs/components-feedback-alert--docs Alert docs at Amsterdam Design System} */ export declare const Alert: import("react").ForwardRefExoticComponent<{ /** Whether the user can dismiss the Alert. Adds a button to its top right. */ closeable?: boolean; /** The label for the button that dismisses the Alert. */ closeButtonLabel?: string; /** The text for the Heading. */ heading: string; /** * The hierarchical level of the Alert’s Heading within the document. * There is no default value; determine the correct level for each instance. * Note: this intentionally does not change the font size. **/ headingLevel: HeadingProps["level"]; /** A function to run when dismissing. */ onClose?: () => void; /** The significance of the message conveyed. */ severity?: Severity; } & HTMLAttributes<HTMLDivElement> & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLDivElement>>; export {};