@wonderflow/react-components
Version:
UI components from Wonderflow's Wanda design system
44 lines • 1.63 kB
TypeScript
import { ReactNode } from 'react';
export declare type DrawerProps = {
/**
* This enable the drawer to be closed by clicking on the overlay.
* Even if this can be set to `false` we strongly recommend to leave
* it to `true` as it ensures the accessibility of the drawer.
*
* @important This property is considered only when `isModal` is `true`.
*/
closeOnClickOutside?: boolean;
/**
* Set the accessible title of the drawer. This is used by screen readers to
* announce the title of the drawer when opened.
*/
title?: ReactNode;
/**
* Hide or show the drawer header which includes the title and the close button.
* If you hide the title, make sure to add yuor own title element in order
* to provide an accessible label to the drawer.
*/
showHeader?: boolean;
/**
* Set the maximum width of the drawer, on mobile the drawer will be
* automatically collapsed when the width is reached.
*/
maxWidth?: string;
/**
* Set the theme of the content card. To ensure contrast with the default overlay color (dark),
* this is set to `light` by default.
*/
theme?: 'dark' | 'light' | 'auto';
/**
* Set the side on which the drawer will be positioned.
*/
side?: 'left' | 'right';
/**
* Disable the modal behavior of the drawer.
* If `false`, disable the prop `closeOnClickOutside` and
* the page is not blocked when the drawer is open.
*/
isModal?: boolean;
};
export declare const Drawer: FCChildrenClass<DrawerProps>;
//# sourceMappingURL=drawer.d.ts.map