export type BannerSlot = 'root' | 'actions' | 'primaryAction' | 'secondaryAction' | 'closeButton'; type BannerAction = { onClick: () => void; label: string; disabled?: boolean; }; export interface BannerSlots { /** * The component that renders the root. * @default div */ root?: React.ElementType; /** * The component that renders the actions container. * @default div */ actions?: React.ElementType; /** * The component that renders the primary action. * @default 'button' */ primaryAction?: React.ElementType; /** * The component that renders the secondary action. * @default 'button' */ secondaryAction?: React.ElementType; /** * The component that renders the close button. * @default 'button' */ closeButton?: React.ElementType; } export interface BannerProps { /** * The intensity of Alert * @default 'bold' */ intensity?: 'bold' | 'subtle'; /** * The system color of Alert * @default 'neutral' */ color?: 'neutral' | 'error' | 'info' | 'warning' | 'success' | 'accent'; /** * The icon of the banner. */ icon?: React.ReactNode; /** * The title of the banner. */ title?: React.ReactNode; /** * The support text of the banner. */ supportText?: React.ReactNode; /** * The primary action of banner. It will be presented as a button. */ primaryAction?: BannerAction; /** * The secondary action of banner. It will be presented as a button. */ secondaryAction?: BannerAction; /** * Callback fired when the component requests to be closed. * When provided, a close icon button is displayed that triggers the callback when clicked. */ onClose?: (event: React.SyntheticEvent) => void; } export {};