import { Fragment, KeyboardEvent } from 'react'; import { Dialog, DialogPanel, DialogTitle, Input, Transition, TransitionChild } from '@headlessui/react'; interface CreateFolderDialogProps { isOpen: boolean; folderName: string; onFolderNameChange: (name: string) => void; onKeyDown: (e: KeyboardEvent) => void; onClose: () => void; } export function CreateFolderDialog({ isOpen, folderName, onFolderNameChange, onKeyDown, onClose, }: CreateFolderDialogProps) { return (
Create New Folder
onFolderNameChange(e.target.value)} onKeyDown={onKeyDown} placeholder="Enter folder name" className="w-full rounded-lg bg-background py-2 px-3 text-foreground shadow-sm focus:outline-none focus:ring-1 focus:ring-accent" autoFocus />

Press Enter to create or Escape to cancel

); }