diff --git a/src/components/dashboard/TopSoundsSection.tsx b/src/components/dashboard/TopSoundsSection.tsx index 21085d5..0dcdadc 100644 --- a/src/components/dashboard/TopSoundsSection.tsx +++ b/src/components/dashboard/TopSoundsSection.tsx @@ -130,7 +130,7 @@ export function TopSoundsSection({ )} diff --git a/src/components/playlists/CreatePlaylistDialog.tsx b/src/components/playlists/CreatePlaylistDialog.tsx new file mode 100644 index 0000000..9564997 --- /dev/null +++ b/src/components/playlists/CreatePlaylistDialog.tsx @@ -0,0 +1,105 @@ +import { Button } from '@/components/ui/button' +import { + Dialog, + DialogContent, + DialogDescription, + DialogFooter, + DialogHeader, + DialogTitle, +} from '@/components/ui/dialog' +import { Input } from '@/components/ui/input' +import { Label } from '@/components/ui/label' +import { Textarea } from '@/components/ui/textarea' + +interface CreatePlaylistDialogProps { + open: boolean + onOpenChange: (open: boolean) => void + loading: boolean + name: string + description: string + genre: string + onNameChange: (name: string) => void + onDescriptionChange: (description: string) => void + onGenreChange: (genre: string) => void + onSubmit: () => void + onCancel: () => void +} + +export function CreatePlaylistDialog({ + open, + onOpenChange, + loading, + name, + description, + genre, + onNameChange, + onDescriptionChange, + onGenreChange, + onSubmit, + onCancel, +}: CreatePlaylistDialogProps) { + return ( + + + + Create New Playlist + + Add a new playlist to organize your sounds. Give it a name + and optionally add a description and genre. + + +
+
+ + onNameChange(e.target.value)} + onKeyDown={e => { + if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault() + onSubmit() + } + }} + /> +
+
+ +