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 { useState } from 'react'
|
||||||
import type {
|
import type { NoteEditorProps, NoteFormProps } from '../interfaces/note-editor'
|
||||||
NoteEditorProps,
|
|
||||||
NoteFormProps,
|
|
||||||
} from '../interfaces/note-editor'
|
|
||||||
import { isTitleValid, normalizeTitle } from '../lib/noteValidation'
|
import { isTitleValid, normalizeTitle } from '../lib/noteValidation'
|
||||||
import DeleteModal from './DeleteModal'
|
import DeleteModal from './DeleteModal'
|
||||||
|
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ export interface DeleteModalProps {
|
|||||||
title: string
|
title: string
|
||||||
onConfirm: () => void
|
onConfirm: () => void
|
||||||
onCancel: () => void
|
onCancel: () => void
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
export interface FloatingButtonProps {
|
export interface FloatingButtonProps {
|
||||||
onClick: () => void
|
onClick: () => void
|
||||||
label?: string
|
label?: string
|
||||||
}
|
}
|
||||||
@@ -26,4 +26,4 @@ export interface NoteFormProps {
|
|||||||
onContentChange: (value: string) => void
|
onContentChange: (value: string) => void
|
||||||
onCancel: () => void
|
onCancel: () => void
|
||||||
onSubmit: () => void
|
onSubmit: () => void
|
||||||
}
|
}
|
||||||
@@ -3,4 +3,4 @@ import type { Note } from '../types/note'
|
|||||||
export interface NoteListProps {
|
export interface NoteListProps {
|
||||||
notes: Note[]
|
notes: Note[]
|
||||||
onSelect: (id: number) => void
|
onSelect: (id: number) => void
|
||||||
}
|
}
|
||||||
@@ -23,4 +23,4 @@ describe('normalizeTitle', () => {
|
|||||||
it('keeps an already trimmed title unchanged', () => {
|
it('keeps an already trimmed title unchanged', () => {
|
||||||
expect(normalizeTitle('Courses')).toBe('Courses')
|
expect(normalizeTitle('Courses')).toBe('Courses')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@@ -4,4 +4,4 @@ export function isTitleValid(title: string): boolean {
|
|||||||
|
|
||||||
export function normalizeTitle(title: string): string {
|
export function normalizeTitle(title: string): string {
|
||||||
return title.trim()
|
return title.trim()
|
||||||
}
|
}
|
||||||
+1
-1
@@ -4,4 +4,4 @@ export interface Note {
|
|||||||
content: string
|
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