c-command-7.tsx
"use client"
import { useState } from "react"
import { Button } from "@/components/ui/button"
import {
Command,
CommandDialog,
CommandEmpty,
CommandGroup,
CommandInput,
CommandItem,
CommandList,
CommandSeparator,
CommandShortcut,
} from "@/components/ui/command"
import { IconPlaceholder } from "@/app/(create)/components/icon-placeholder"
export function Pattern() {
const [open, setOpen] = useState(false)
return (
<>
<Button onClick={() => setOpen(true)} variant="outline">
Quick Actions
</Button>
<CommandDialog open={open} onOpenChange={setOpen}>
<Command className="**:data-[selected=true]:bg-muted **:data-selected:bg-transparent">
<CommandInput placeholder="What do you need?" />
<CommandList>
<CommandEmpty>No actions found.</CommandEmpty>
<CommandGroup heading="Create">
<CommandItem>
<IconPlaceholder
lucide="PlusIcon"
tabler="IconPlus"
hugeicons="PlusSignIcon"
phosphor="PlusIcon"
remixicon="RiAddLine"
/>
<span>New Project</span>
<CommandShortcut>⌘N</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="FileTextIcon"
tabler="IconFileText"
hugeicons="File02Icon"
phosphor="FileTextIcon"
remixicon="RiFileTextLine"
/>
<span>New Document</span>
<CommandShortcut>⌘⇧N</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="UserPlusIcon"
tabler="IconUserPlus"
hugeicons="UserAdd01Icon"
phosphor="UserPlusIcon"
remixicon="RiUserAddLine"
/>
<span>Invite Member</span>
<CommandShortcut>⌘I</CommandShortcut>
</CommandItem>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading="Navigate">
<CommandItem>
<IconPlaceholder
lucide="HouseIcon"
tabler="IconHome"
hugeicons="Home03Icon"
phosphor="HouseIcon"
remixicon="RiHome5Line"
/>
<span>Go to Dashboard</span>
<CommandShortcut>⌘D</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="InboxIcon"
tabler="IconInbox"
hugeicons="InboxIcon"
phosphor="TrayIcon"
remixicon="RiInboxLine"
/>
<span>Go to Inbox</span>
<CommandShortcut>⌘⇧I</CommandShortcut>
</CommandItem>
</CommandGroup>
<CommandSeparator />
<CommandGroup heading="System">
<CommandItem>
<IconPlaceholder
lucide="MoonIcon"
tabler="IconMoon"
hugeicons="Moon02Icon"
phosphor="MoonIcon"
remixicon="RiMoonLine"
/>
<span>Toggle Dark Mode</span>
<CommandShortcut>⌘⇧D</CommandShortcut>
</CommandItem>
<CommandItem>
<IconPlaceholder
lucide="LogOutIcon"
tabler="IconLogout"
hugeicons="LogoutSquare01Icon"
phosphor="SignOutIcon"
remixicon="RiLogoutBoxRLine"
/>
<span>Sign Out</span>
<CommandShortcut>⌘Q</CommandShortcut>
</CommandItem>
</CommandGroup>
</CommandList>
</Command>
</CommandDialog>
</>
)
}
























