baseui
Version:
A React Component library implementing the Base design language
41 lines (40 loc) • 1.59 kB
TypeScript
import * as React from 'react';
import type { DrawerProps, DrawerState, SharedStylePropsArg, CloseSource, ElementRef } from './types';
import type { SyntheticEvent } from 'react';
declare class Drawer extends React.Component<DrawerProps, DrawerState> {
static defaultProps: Partial<DrawerProps>;
animateOutTimer: ReturnType<typeof setTimeout> | undefined | null;
animateStartTimer: ReturnType<typeof requestAnimationFrame> | undefined | null;
lastFocus: HTMLElement | undefined | null;
lastMountNodeOverflowStyle: string | undefined | null;
_refs: {
[x: string]: ElementRef;
};
state: {
isVisible: boolean;
mounted: boolean;
isFocusVisible: boolean;
};
componentDidMount(): void;
componentWillUnmount(): void;
componentDidUpdate(prevProps: DrawerProps, prevState: DrawerState): void;
handleFocus: (event: SyntheticEvent) => void;
handleBlur: (event: SyntheticEvent) => void;
disableMountNodeScroll(): void;
resetMountNodeScroll(): void;
getMountNode(): HTMLElement;
onEscape: () => void;
onBackdropClick: (event: Event) => void;
onCloseClick: () => void;
clearTimers(): void;
didOpen(): void;
didClose(): void;
triggerClose(source?: CloseSource): void;
animateOutComplete: () => void;
getSharedProps(): Omit<SharedStylePropsArg, 'children'>;
getChildren(): React.ReactNode;
getRef(component: string): ElementRef;
renderDrawer(renderedContent: React.ReactNode): React.JSX.Element;
render(): React.JSX.Element;
}
export default Drawer;