diff --git a/components/drawer/index.tsx b/components/drawer/index.tsx index a4f87f1649..5a4e604f06 100644 --- a/components/drawer/index.tsx +++ b/components/drawer/index.tsx @@ -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 {