diff --git a/components/commandmenu/CommandMenu.stories.tsx b/components/commandmenu/CommandMenu.stories.tsx index ad6debd..4a6d037 100644 --- a/components/commandmenu/CommandMenu.stories.tsx +++ b/components/commandmenu/CommandMenu.stories.tsx @@ -1,4 +1,4 @@ -import React, {useRef} from 'react'; +import React, {useRef, useState} from 'react'; import {Meta, StoryObj} from "@storybook/react"; import {Input} from '../input/Input'; import { @@ -25,13 +25,16 @@ type Story = StoryObj; export const Default = () => { - const dialogRef = useRef(null); + const [isDialogOpen, setIsDialogOpen] = useState(false) + + const openDialog = () => setIsDialogOpen(true) + const closeDialog = () => setIsDialogOpen(false) return ( <> - + - } shortcut={"⌘ T"}/> + } shortcut={"⌘ T"} onClick={() => console.log("test")}/> } shortcut={"⌘ A"}/> } shortcut={"⌘ I"}/> @@ -43,7 +46,7 @@ export const Default = () => {