fix: Drawer levelMove types (#30714)

This commit is contained in:
David Santos 2021-09-04 11:35:30 +01:00 committed by GitHub
parent 04d140d7a6
commit 63ddba3023
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,6 +20,8 @@ type EventType =
type getContainerFunc = () => HTMLElement;
type ILevelMove = number | [number, number];
const PlacementTypes = tuple('top', 'right', 'bottom', 'left');
type placementType = typeof PlacementTypes[number];
@ -57,6 +59,9 @@ export interface DrawerProps {
footer?: React.ReactNode;
footerStyle?: React.CSSProperties;
level?: string | string[] | null | undefined;
levelMove?:
| ILevelMove
| ((e: { target: HTMLElement; open: boolean }) => ILevelMove);
}
export interface IDrawerState {