UNPKG

@porsche-design-system/components-react

Version:

Porsche Design System is a component library designed to help developers create the best experience for software or services distributed by Dr. Ing. h.c. F. Porsche AG.

103 lines (102 loc) 3.65 kB
import type { BaseProps } from '../../BaseProps'; import type { InlineNotificationActionIcon, InlineNotificationHeadingTag, InlineNotificationState } from '../types'; export type PInlineNotificationProps = BaseProps & { /** * Sets the icon displayed inside the action button using a PDS icon name. * @default 'arrow-right' */ actionIcon?: InlineNotificationActionIcon; /** * Sets the label text of the optional action button inside the notification. */ actionLabel?: string; /** * Disables the action button and shows a spinner to indicate an ongoing operation. * @default false */ actionLoading?: boolean; /** * Sets the supporting description text shown below the heading. * @default '' */ description?: string; /** * Shows a dismiss button so the user can manually close the notification. * @default true */ dismissButton?: boolean; /** * Sets the heading text displayed at the top of the inline notification. * @default '' */ heading?: string; /** * Sets the HTML heading tag (e.g. h2, h3) to maintain correct document structure. * @default 'h5' */ headingTag?: InlineNotificationHeadingTag; /** * Emitted when the user clicks the action button. */ onAction?: (event: CustomEvent<void>) => void; /** * Emitted when the user clicks the dismiss button. */ onDismiss?: (event: CustomEvent<void>) => void; /** * Sets the visual state — controls the icon and color scheme (`info`, `warning`, `error`, `success`). * @default 'info' */ state?: InlineNotificationState; }; export declare const PInlineNotification: import("react").ForwardRefExoticComponent<Omit<import("react").DOMAttributes<{}>, "onChange" | "onInput" | "onToggle"> & Pick<import("react").HTMLAttributes<{}>, "suppressHydrationWarning" | "autoFocus" | "className" | "dir" | "hidden" | "id" | "inert" | "inputMode" | "lang" | "slot" | "style" | "tabIndex" | "title" | "translate" | "role"> & { /** * Sets the icon displayed inside the action button using a PDS icon name. * @default 'arrow-right' */ actionIcon?: InlineNotificationActionIcon; /** * Sets the label text of the optional action button inside the notification. */ actionLabel?: string; /** * Disables the action button and shows a spinner to indicate an ongoing operation. * @default false */ actionLoading?: boolean; /** * Sets the supporting description text shown below the heading. * @default '' */ description?: string; /** * Shows a dismiss button so the user can manually close the notification. * @default true */ dismissButton?: boolean; /** * Sets the heading text displayed at the top of the inline notification. * @default '' */ heading?: string; /** * Sets the HTML heading tag (e.g. h2, h3) to maintain correct document structure. * @default 'h5' */ headingTag?: InlineNotificationHeadingTag; /** * Emitted when the user clicks the action button. */ onAction?: (event: CustomEvent<void>) => void; /** * Emitted when the user clicks the dismiss button. */ onDismiss?: (event: CustomEvent<void>) => void; /** * Sets the visual state — controls the icon and color scheme (`info`, `warning`, `error`, `success`). * @default 'info' */ state?: InlineNotificationState; } & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLElement>>;