feat(notes): wire app with floating add button
This commit is contained in:
1 parent
0af0cdc405
commit
9a086cbe7b
5 files changed
+213
-7
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user