import type { ReactNode } from 'react'; import React from 'react'; import type { Props as ReactModalProps } from 'react-modal'; type Size = 'small' | 'medium' | 'large'; type Variant = 'light' | 'dark'; type Side = 'left' | 'right'; interface Props { /** * Allows to control the state of component */ isOpen: boolean; /** * Allows to define title shown in the header */ title?: string; /** * Unique ID for the component */ id?: string; /** * Allows to define subtitle shown in the header */ subtitle?: string; /** * Content of the component */ children?: ReactNode; /** * Allows to hide application from assistive screenreaders and other assistive technologies while the drawer is open * * @default '#__next' */ appElement?: string; /** * Allows to change the size of the component. * Size in mobile view is always 100% of the window size * * @param {Size} small Renders component as 375px wide * @param {Size} medium Renders component as 768px wide * @param {Size} large Renders component as 1080px wide * * @default 'medium' */ size?: Size; /** * Allows to change the color scheme of the component * * @param {Variant} light Sets header background color to `theme.color.background.white.default` * @param {Variant} dark Sets header background color to `theme.color.background.plum.E02` * * @default 'light' */ variant?: Variant; /** * Allows to change the opening side of the component * * @param {Side} left Opens the drawer from the left side * @param {Side} right Opens the drawer from the right side * * @default 'right' */ side?: Side; /** * Allows to pass a custom padding * * @default '1.25rem' */ padding?: string; /** * On overlay or close button click callback */ onRequestClose?: ReactModalProps['onRequestClose']; /** * Allows to set property `aria-label` for content element */ contentLabel?: string; /** * Allows to set property `aria-label` for `ButtonClose` element */ closeLabel?: string; /** * Allows to show and hide close button * * @default true */ closeButton?: boolean; /** * Allows to disable all closing handlers. * When set to `false`, modal can be closed only by setting `isOpen` flag to `false` * * @default true */ isClosable?: boolean; /** * Allows to display the footer content */ footer?: ReactNode; /** * Allows to pass a custom className */ className?: string; /** * Allows to pass testid string for testing purposes */ 'data-testid'?: string; } declare const Drawer: ({ appElement, size, side, variant, padding, closeButton, isClosable, "data-testid": dataTestId, ...props }: Props) => React.JSX.Element; export default Drawer;