27 lines
396 B
TypeScript
27 lines
396 B
TypeScript
import { nanoid } from "nanoid";
|
|
import type { Note } from "./types";
|
|
|
|
export const palette = [
|
|
'#ffffff',
|
|
'#f28b82',
|
|
'#f6a04d',
|
|
'#fff475',
|
|
'#ccff90',
|
|
'#a7ffeb',
|
|
'#cbf0f8',
|
|
'#aecbfa',
|
|
'#d7aefb',
|
|
'#fdcfe8',
|
|
'#e6c9a8',
|
|
'#e8eaed'
|
|
];
|
|
|
|
export const createEmptyNote = (): Note => ({
|
|
id: nanoid(),
|
|
title: '',
|
|
content: '',
|
|
color: palette[0],
|
|
date: new Date(),
|
|
images: [],
|
|
files: []
|
|
}); |