mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix: draggable modal demo
This commit is contained in:
parent
1d39358bd5
commit
b1f79d4310
@ -52,8 +52,8 @@ Upgrade today by running one of the following commands:
|
||||
|
||||
<PackageManagers
|
||||
commands={{
|
||||
cli: "nextui upgrade",
|
||||
npm: "npx nextui-cli@latest upgrade",
|
||||
cli: "nextui upgrade --all",
|
||||
npm: "npx nextui-cli@latest upgrade --all",
|
||||
}}
|
||||
/>
|
||||
|
||||
@ -514,7 +514,7 @@ See the [Dark Mode documentation](/docs/customization/dark-mode) for more detail
|
||||
|
||||
Added support for draggable modals.
|
||||
|
||||
<CodeDemo title="Draggable Modal" showEditor={false} files={modalContent.draggable} />
|
||||
<CodeDemo title="Draggable Modal" files={modalContent.draggable} />
|
||||
|
||||
<Spacer y={4} />
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ import {
|
||||
export default function App() {
|
||||
const {isOpen, onOpen, onOpenChange} = useDisclosure();
|
||||
const targetRef = React.useRef(null);
|
||||
const {moveProps} = useDraggable({targetRef});
|
||||
const {moveProps} = useDraggable({targetRef, isDisabled: !isOpen});
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user