mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-03 22:16:54 +00:00
feat(notes/nui): Notes initial commit
This commit is contained in:
1 parent
3f6600c28c
commit
f1aea97cc4
12 files changed
+228
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import React from 'react'
|
||||
import { AppWrapper } from '../../ui/components/AppWrapper';
|
||||
import { AppContent } from '../../ui/components/AppContent';
|
||||
import NotesTitle from './NotesTitle';
|
||||
import NoteList from './list/NoteList';
|
||||
|
||||
|
||||
import { useNotes } from './hooks/useNotes';
|
||||
import { AddNoteModal } from './modal/AddNoteModal';
|
||||
import { Button, Fab } from '@material-ui/core';
|
||||
import AddIcon from '@material-ui/icons/Add';
|
||||
|
||||
import { useNoteModal } from './hooks/useNoteModal';
|
||||
|
||||
import useStyles from './notes.styles';
|
||||
|
||||
export const NotesApp = () => {
|
||||
const { noteModal, setNoteModal } = useNoteModal();
|
||||
const notes = useNotes();
|
||||
|
||||
const classes = useStyles();
|
||||
|
||||
const handleModal = () => {
|
||||
setNoteModal(true)
|
||||
}
|
||||
|
||||
return (
|
||||
<AppWrapper id="notes-app">
|
||||
<NotesTitle />
|
||||
<AddNoteModal />
|
||||
<div className={ noteModal ? classes.backgroundModal : undefined} />
|
||||
<AppContent>
|
||||
<NoteList notes={notes}/>
|
||||
<Fab
|
||||
onClick={handleModal}
|
||||
style={{
|
||||
background: '#f9a825',
|
||||
color: '#fff'
|
||||
}}
|
||||
>
|
||||
<AddIcon />
|
||||
</Fab>
|
||||
</AppContent>
|
||||
</AppWrapper>
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user