import type { Meta, StoryObj } from '@storybook/react'; import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, } from './command'; import { Calculator, Calendar, CreditCard, Settings, Smile, User } from 'lucide-react'; import React, { useState, useEffect } from 'react'; const meta: Meta = { title: 'UI/Command', component: Command, render: args => , }; export default meta; type Story = StoryObj; export const Default: Story = { render: args => (
No results found. Calendar Search Emoji Calculator Profile ⌘P Billing ⌘B Settings ⌘S
), }; export const Dialog: Story = { render: () => { const [open, setOpen] = useState(false); useEffect(() => { const down = (e: KeyboardEvent) => { if (e.key === 'k' && (e.metaKey || e.ctrlKey)) { e.preventDefault(); setOpen(open => !open); } }; document.addEventListener('keydown', down); return () => document.removeEventListener('keydown', down); }, []); return (

Press{' '} K

No results found. Calendar Search Emoji Calculator Profile ⌘P Billing ⌘B Settings ⌘S
); }, };