feat: close tranbox when click away

This commit is contained in:
Gabe Yuan
2024-04-01 12:25:59 +08:00
parent 60d788288d
commit 7a12c5315a
6 changed files with 34 additions and 1 deletions

View File

@@ -148,6 +148,7 @@ export default function DraggableResizable({
},
onChangeSize,
onChangePosition,
...props
}) {
const lineWidth = 4;
const [position, setPosition] = useState(defaultPosition);
@@ -182,6 +183,7 @@ export default function DraggableResizable({
gridTemplateRows: `${lineWidth * 2}px auto ${lineWidth * 2}px`,
zIndex: 2147483647,
}}
{...props}
>
<Pointer
direction="TopLeft"