style(notes): apply formatting of interfaces and domain files
This commit is contained in:
1 parent
5aeeb21f7f
commit
4ae6ff61b4
8 files changed
+8
-11
No files matched your search
@@ -1,8 +1,5 @@
|
||||
import { useState } from 'react'
|
||||
import type {
|
||||
NoteEditorProps,
|
||||
NoteFormProps,
|
||||
} from '../interfaces/note-editor'
|
||||
import type { NoteEditorProps, NoteFormProps } from '../interfaces/note-editor'
|
||||
import { isTitleValid, normalizeTitle } from '../lib/noteValidation'
|
||||
import DeleteModal from './DeleteModal'
|
||||
|
||||
|
||||
@@ -3,4 +3,4 @@ export interface DeleteModalProps {
|
||||
title: string
|
||||
onConfirm: () => void
|
||||
onCancel: () => void
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface FloatingButtonProps {
|
||||
onClick: () => void
|
||||
label?: string
|
||||
}
|
||||
}
|
||||
@@ -26,4 +26,4 @@ export interface NoteFormProps {
|
||||
onContentChange: (value: string) => void
|
||||
onCancel: () => void
|
||||
onSubmit: () => void
|
||||
}
|
||||
}
|
||||
@@ -3,4 +3,4 @@ import type { Note } from '../types/note'
|
||||
export interface NoteListProps {
|
||||
notes: Note[]
|
||||
onSelect: (id: number) => void
|
||||
}
|
||||
}
|
||||
@@ -23,4 +23,4 @@ describe('normalizeTitle', () => {
|
||||
it('keeps an already trimmed title unchanged', () => {
|
||||
expect(normalizeTitle('Courses')).toBe('Courses')
|
||||
})
|
||||
})
|
||||
})
|
||||
@@ -4,4 +4,4 @@ export function isTitleValid(title: string): boolean {
|
||||
|
||||
export function normalizeTitle(title: string): string {
|
||||
return title.trim()
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -4,4 +4,4 @@ export interface Note {
|
||||
content: string
|
||||
}
|
||||
|
||||
export type NotePatch = Partial<Pick<Note, 'title' | 'content'>>
|
||||
export type NotePatch = Partial<Pick<Note, 'title' | 'content'>>
|
||||
Reference in new issue
Block a user