diff --git a/src/components/common/draggable/withDraggable.jsx b/src/components/common/draggable/withDraggable.jsx index 81138e2..4da04ff 100644 --- a/src/components/common/draggable/withDraggable.jsx +++ b/src/components/common/draggable/withDraggable.jsx @@ -3,7 +3,7 @@ import { useState } from 'react' import Draggable from 'react-draggable' -export default function WithDraggable({ isShow, children }) { +export default function WithDraggable({ isShow, handle = '', children }) { const [position, setPosition] = useState({ x: 0, y: 0 }) const handleOnDrag = (data) => { @@ -13,7 +13,11 @@ export default function WithDraggable({ isShow, children }) { return ( <> {isShow && ( - handleOnDrag(data)} handle=".modal-header"> + handleOnDrag(data)} + handle={handle === '' ? '.modal-head' : handle} + > {children} )}