diff --git a/src/DraggablePanel/FloatMode.tsx b/src/DraggablePanel/FloatMode.tsx index 89d45dc2..2492e65b 100644 --- a/src/DraggablePanel/FloatMode.tsx +++ b/src/DraggablePanel/FloatMode.tsx @@ -2,7 +2,7 @@ import type { Enable, NumberSize, Size } from 're-resizable'; import { HandleClassName } from 're-resizable'; import type { CSSProperties, FC, ReactNode } from 'react'; import { memo, useMemo } from 'react'; -import type { Position, Props as RndProps } from 'react-rnd'; +import type { Position, Props, Props as RndProps } from 'react-rnd'; import { Rnd } from 'react-rnd'; import { useStyle } from './style'; @@ -155,7 +155,7 @@ export const FloatMode: FC = memo( maxHeight: maxHeight ? Math.max(maxHeight, 0) : undefined, maxWidth: maxWidth ? Math.max(maxWidth, 0) : undefined, defaultSize, - size: size as Size, + size: size as Props[`size`], style, }; @@ -163,10 +163,12 @@ export const FloatMode: FC = memo( { onPositionChange?.({ x: data.x, y: data.y }); }}