feat(notes): wire app with floating add button

This commit is contained in:
devcodetools committed 2026-09-13 15:34:50 +02:00
1 parent 0af0cdc405
commit 9a086cbe7b
5 files changed
+213 -7

No files matched your search

+3 -2
View File
@@ -6,10 +6,11 @@ interface NoteEditorProps {
note: Note
onUpdate: (id: number, patch: Partial<Pick<Note, 'title' | 'content'>>) => void
onDelete: (id: number) => void
autoEdit?: boolean
}
function NoteEditor({ note, onUpdate, onDelete }: NoteEditorProps) {
const [editing, setEditing] = useState(false)
function NoteEditor({ note, onUpdate, onDelete, autoEdit = false }: NoteEditorProps) {
const [editing, setEditing] = useState(autoEdit)
const [confirmDelete, setConfirmDelete] = useState(false)
const [title, setTitle] = useState(note.title)
const [content, setContent] = useState(note.content)