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.

55 lines (54 loc) 2.46 kB
import type { BaseProps } from '../../BaseProps'; import type { CanvasBackground, CanvasSidebarStartUpdateEventDetail } from '../types'; export type PCanvasProps = BaseProps & { /** * Sets the background color of the main content area and automatically applies a matching color to the sidebar. * @default 'canvas' */ background?: CanvasBackground; /** * Emitted when the user dismisses the end sidebar via the close button. */ onSidebarEndDismiss?: (event: CustomEvent<void>) => void; /** * Emitted when the user toggles the start sidebar, with the new open state in the event detail. */ onSidebarStartUpdate?: (event: CustomEvent<CanvasSidebarStartUpdateEventDetail>) => void; /** * Controls whether the utility sidebar on the end side (right in LTR) is open or collapsed. * @default false */ sidebarEndOpen?: boolean; /** * Controls whether the navigation sidebar on the start side (left in LTR) is open or collapsed. * @default false */ sidebarStartOpen?: boolean; }; export declare const PCanvas: 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 background color of the main content area and automatically applies a matching color to the sidebar. * @default 'canvas' */ background?: CanvasBackground; /** * Emitted when the user dismisses the end sidebar via the close button. */ onSidebarEndDismiss?: (event: CustomEvent<void>) => void; /** * Emitted when the user toggles the start sidebar, with the new open state in the event detail. */ onSidebarStartUpdate?: (event: CustomEvent<CanvasSidebarStartUpdateEventDetail>) => void; /** * Controls whether the utility sidebar on the end side (right in LTR) is open or collapsed. * @default false */ sidebarEndOpen?: boolean; /** * Controls whether the navigation sidebar on the start side (left in LTR) is open or collapsed. * @default false */ sidebarStartOpen?: boolean; } & { children?: import("react").ReactNode | undefined; } & import("react").RefAttributes<HTMLElement>>;