diff --git a/src/components/common/draggable/WithDraggable.jsx b/src/components/common/draggable/WithDraggable.jsx index e2f769cc..49552eac 100644 --- a/src/components/common/draggable/WithDraggable.jsx +++ b/src/components/common/draggable/WithDraggable.jsx @@ -3,16 +3,7 @@ import { useState } from 'react' import Draggable from 'react-draggable' -export default function WithDraggable({ - isShow, - children, - pos = { x: 0, y: 0 }, - handle = '', - className = '', - isModal = true, - hasFooter = true, - isHidden = false, -}) { +export default function WithDraggable({ isShow, children, pos = { x: 0, y: 0 }, handle = '', className = '', hasFooter = true, isHidden = false }) { const [position, setPosition] = useState(pos) const handleOnDrag = (e, data) => { @@ -31,14 +22,10 @@ export default function WithDraggable({ onDrag={(e, data) => handleOnDrag(e, data)} handle={handle === '' ? '.modal-handle' : handle} > - {isModal ? ( -
- {children} - {hasFooter && } -
- ) : ( - <>{children} - )} +
+ {children} + {hasFooter && } +
)} @@ -68,15 +55,10 @@ function WithDraggableBody({ children }) { ) } -function WithDraggablePanel({ children }) { - return <>{children} -} - function WithDraggableFooter() { return
} WithDraggable.Header = WithDraggableHeader WithDraggable.Body = WithDraggableBody -WithDraggable.Panel = WithDraggablePanel WithDraggable.Footer = WithDraggableFooter