style(app): apply prettier formatting
This commit is contained in:
1 parent
e13652a753
commit
8523ace11f
5 files changed
+17
-19
No files matched your search
+12
-12
@@ -40,18 +40,18 @@ function App() {
|
|||||||
<main className="mx-auto flex w-full max-w-2xl min-h-dvh flex-col pb-[calc(env(safe-area-inset-bottom)+7rem)]">
|
<main className="mx-auto flex w-full max-w-2xl min-h-dvh flex-col pb-[calc(env(safe-area-inset-bottom)+7rem)]">
|
||||||
<header className="sticky top-0 z-10 border-b border-gray-200 bg-white/95 px-4 pb-3 pt-[calc(env(safe-area-inset-top)+0.75rem)] backdrop-blur">
|
<header className="sticky top-0 z-10 border-b border-gray-200 bg-white/95 px-4 pb-3 pt-[calc(env(safe-area-inset-top)+0.75rem)] backdrop-blur">
|
||||||
<div className="flex h-11 items-center gap-1">
|
<div className="flex h-11 items-center gap-1">
|
||||||
{creating || selectedNote ? (
|
{creating || selectedNote ? (
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={goBack}
|
onClick={goBack}
|
||||||
aria-label="Retour"
|
aria-label="Retour"
|
||||||
className="flex items-center justify-center w-11 h-11 -ml-2 rounded-full text-xl text-gray-700 hover:bg-gray-100 active:bg-gray-200"
|
className="flex items-center justify-center w-11 h-11 -ml-2 rounded-full text-xl text-gray-700 hover:bg-gray-100 active:bg-gray-200"
|
||||||
>
|
>
|
||||||
←
|
←
|
||||||
</button>
|
</button>
|
||||||
) : null}
|
) : null}
|
||||||
<h1 className="text-lg font-semibold">Notes</h1>
|
<h1 className="text-lg font-semibold">Notes</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<section className="flex-1 px-4 py-4">
|
<section className="flex-1 px-4 py-4">
|
||||||
|
|||||||
@@ -58,4 +58,4 @@ function NoteEditor(props: NoteEditorProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NoteEditor
|
export default NoteEditor
|
||||||
@@ -68,4 +68,4 @@ function NoteForm({
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NoteForm
|
export default NoteForm
|
||||||
@@ -8,9 +8,7 @@ const note: Note = { id: 42, title: 'Courses', content: 'Lait\nOeufs' }
|
|||||||
const renderView = (overrides: Partial<Note> = {}) => {
|
const renderView = (overrides: Partial<Note> = {}) => {
|
||||||
const onEdit = vi.fn()
|
const onEdit = vi.fn()
|
||||||
const onDelete = vi.fn()
|
const onDelete = vi.fn()
|
||||||
render(
|
render(<NoteReadView note={{ ...note, ...overrides }} onEdit={onEdit} onDelete={onDelete} />)
|
||||||
<NoteReadView note={{ ...note, ...overrides }} onEdit={onEdit} onDelete={onDelete} />,
|
|
||||||
)
|
|
||||||
return { onEdit, onDelete }
|
return { onEdit, onDelete }
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -56,4 +54,4 @@ describe('NoteReadView', () => {
|
|||||||
|
|
||||||
expect(onDelete).not.toHaveBeenCalled()
|
expect(onDelete).not.toHaveBeenCalled()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -43,4 +43,4 @@ function NoteReadView({ note, onEdit, onDelete }: NoteReadViewProps) {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
export default NoteReadView
|
export default NoteReadView
|
||||||
Reference in new issue
Block a user