@littlespoon/drawer
Version:
Little Spoon drawer
69 lines (58 loc) • 1.46 kB
Flow
/**
* Flowtype definitions for Drawer
* Generated by Flowgen from a Typescript Definition
* Flowgen v1.21.0
* @flow
*/
import { PropsWithChildren } from "react";
export type DrawerProps = PropsWithChildren<{
/**
* ARIA label of the component.
*/
"aria-label"?: string,
/**
* A space-separated list of CSS classes.
*/
className?: string,
/**
* Close button title.
* @defaultValue `'Close'`
*/
closeButtonTitle?: string,
/**
* Test identifier of the component.
* @defaultValue `'@modal:drawer'`
*/
"data-test"?: string,
/**
* If `true`, clicking the Backdrop will not fire the `onClose` callback.
* @defaultValue `false`
*/
disableBackdropClick?: boolean,
/**
* If `true`, pressing the Escape key will not fire the `onClose` callback.
* @defaultValue `false`
*/
disableEscapeKeyDown?: boolean,
/**
* Callback fired when the component requests to be closed.
*/
onClose?: () => void,
/**
* If `true`, the component is shown.
* @defaultValue `false`
*/
open?: boolean,
/**
* If `true`, the close button will be shown.
* @defaultValue `false`
*/
showCloseButton?: boolean,
/**
* If 'true', content of the drawer will be strechted to the full height of a drawer
*/
useFullHeight?: boolean,
...
}>;
declare export var SHOW_HIDE_ANIMATION_DURATION: 300;
declare export default function Drawer(x: DrawerProps): React$Node | null;