From 217c0d92fdc9aa272a834d93056435475f8c5bf8 Mon Sep 17 00:00:00 2001 From: Siniji <1349021570@qq.com> Date: Thu, 11 Jul 2024 16:05:23 +0800 Subject: [PATCH] :pencil2: fix: types fixed --- src/DraggablePanel/FloatMode.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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 }); }}