Debian Codegraph @

node/@patternfly/react-core/dist/esm/components/Drawer/DrawerPanelContent.d.ts

raw
1 /// <reference types="react" />
2 import { DrawerColorVariant } from './Drawer';
3 export interface DrawerPanelFocusTrapObject {
4 /** Enables a focus trap on the drawer panel content. This will also automatically
5 * handle focus management when the panel expands and when it collapses. Do not pass
6 * this prop if the isStatic prop on the drawer component is true.
7 */
8 enabled?: boolean;
9 /** The element to focus when the drawer panel content expands. By default the
10 * first focusable element will receive focus. If there are no focusable elements, the
11 * panel itself will receive focus.
12 */
13 elementToFocusOnExpand?: HTMLElement | SVGElement | string;
14 /** One or more id's to use for the drawer panel content's accessible label. */
15 'aria-labelledby'?: string;
16 }
17 export interface DrawerPanelContentProps extends Omit<React.HTMLProps<HTMLDivElement>, 'onResize'> {
18 /** Additional classes added to the drawer. */
19 className?: string;
20 /** ID of the drawer panel */
21 id?: string;
22 /** Content to be rendered in the drawer panel. */
23 children?: React.ReactNode;
24 /** Flag indicating that the drawer panel should not have a border. */
25 hasNoBorder?: boolean;
26 /** Flag indicating that the drawer panel should be resizable. */
27 isResizable?: boolean;
28 /** @beta Flag indicating that the drawer panel should disable glass styles. This prop is intended to work with isPill drawers. */
29 hasNoGlass?: boolean;
30 /** @beta Flag indicating that the drawer panel should use glass styles when in glass theme */
31 isGlass?: boolean;
32 /** @beta Flag indicating that the drawer panel should use plain styles. This only applies when the drawer is static or inline. */
33 isPlain?: boolean;
34 /** @beta Flag indicating that plain styles should be disabled when glass styles are used. This only applies when the drawer is static or inline. */
35 isNoPlainOnGlass?: boolean;
36 /** Callback for resize end. */
37 onResize?: (event: MouseEvent | TouchEvent | React.KeyboardEvent, width: number, id: string) => void;
38 /** The minimum size of a drawer. */
39 minSize?: string;
40 /** The starting size of a drawer. */
41 defaultSize?: string;
42 /** The maximum size of a drawer. */
43 maxSize?: string;
44 /** The increment amount for keyboard drawer resizing. */
45 increment?: number;
46 /** Aria label for the resizable drawer splitter. */
47 resizeAriaLabel?: string;
48 /** Width for drawer panel at various breakpoints. Overridden by resizable drawer minSize and defaultSize. */
49 widths?: {
50 default?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
51 lg?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
52 xl?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
53 '2xl'?: 'width_25' | 'width_33' | 'width_50' | 'width_66' | 'width_75' | 'width_100';
54 };
55 /**
56 * Color variant of the background of the drawer panel.
57 * The `no-background`is deprecated; use the `isPlain` prop instead.
58 */
59 colorVariant?: DrawerColorVariant | 'no-background' | 'default' | 'secondary';
60 /** Adds and customizes a focus trap on the drawer panel content. */
61 focusTrap?: DrawerPanelFocusTrapObject;
62 }
63 export declare const DrawerPanelContent: React.FunctionComponent<DrawerPanelContentProps>;
64 //# sourceMappingURL=DrawerPanelContent.d.ts.map