Merge branch 'master' of github.com:Re-Ignited-Development/new-phone-who-dis into feature/messages

This commit is contained in:
erik-sn committed 2020-11-18 16:50:53 -05:00
commit b87baeb12e
52 files changed
+1214 -210

No files matched your search

@@ -31,6 +31,11 @@
color: #388CF8 !important;
}
#bank-app .MuiSnackbar-root {
position: absolute;
}
#bank-title {
font-family: 'Bebas Neue', cursive;
font-size: 50px;
@@ -21,6 +21,7 @@ import { NavigationBar } from "./navigation/NavigationBar";
import { BankHome } from './home/BankHome';
import { BankAccount } from './account/BankAccount';
import { TransactionList } from "./transactions/TransactionList";
import { BankAlert } from "./alert/BankAlert";
const useStyles = makeStyles((theme) => ({
root: {
@@ -67,6 +68,7 @@ export const BankApp = () => {
<Route path="/bank/account" exact component={BankAccount} />
<Route path="/bank/transactions" exact component={TransactionList} />
</Switch>
<BankAlert />
</AppContent>
<NavigationBar />
</AppWrapper>
@@ -0,0 +1,8 @@
import React from "react";
import MuiAlert from "@material-ui/lab/Alert";
export function Alert(props) {
return <MuiAlert elevation={6} variant="filled" {...props} />;
}
export default Alert;
@@ -0,0 +1,43 @@
import React, { useState, useEffect } from "react";
import { useBankAlert } from "../../hooks/useBankAlert";
import Snackbar from "@material-ui/core/Snackbar";
import Alert from "./Alert";
import { useTranslation } from "react-i18next";
export const BankAlert = () => {
const { t } = useTranslation();
const [open, setOpen] = useState(false);
const { bankAlert, setBankAlert } = useBankAlert();
const [ message, setMessage ] = useState(null);
const [severity, setSeverity] = useState("");
const _handleClose = () => {
setOpen(false);
setBankAlert(null);
};
useEffect(() => {
if (bankAlert === true ) {
setOpen(true);
setMessage(t("APPS_BANK_ALERT_TRANSFER_SUCCESS"));
setSeverity("success")
} else if (bankAlert === false) {
setOpen(true);
setMessage(t("APPS_BANK_ALERT_TRANSFER_FAILURE"));
setSeverity("error")
}
}, [bankAlert])
return (
<Snackbar
style={{ width: "80%" }}
open={open}
autoHideDuration={6000}
onClose={_handleClose}
>
<Alert onClose={_handleClose} severity={severity}>
{message}
</Alert>
</Snackbar>
);
};
@@ -1,16 +1,45 @@
import React from 'react'
import Alert from '@material-ui/lab/Alert';
import Notification from '../../../../ui/components/Notification';
import { useBankAlert } from './../../hooks/useBankAlert';
import React, { useEffect, useState } from "react";
import Notification from "../../../../ui/components/Notification";
import { usePhone } from "../../../../os/phone/hooks/usePhone";
import { useTranslation } from "react-i18next";
import useStyles from './notification.style';
import { useBankNotification } from "../../hooks/useBankNotification";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faWonSign } from "@fortawesome/free-solid-svg-icons";
export const BankNotification = ({ alert }) => {
const { setBankAlert } = useBankAlert();
export const BankNotification = () => {
const { notification } = useBankNotification()
const classes = useStyles()
const { t } = useTranslation();
const [visible, setVisible ] = useState(false);
const { config } = usePhone()
const handleClose = () => {
setBankAlert(false)
}
useEffect(() => {
if (notification) {
setVisible(true);
}
}, [notification?.id])
if (!config?.bank.showNotifications || !notification) return null;
return (
<div></div>
)
}
<Notification
key={notification.id}
open={visible}
handleClose={() => setVisible(false)}
>
<div className={classes.content}>
<div className={classes.title}>
<div className={classes.titleLeft}>
<div className={classes.icon}>
<FontAwesomeIcon icon={faWonSign} />
</div>
<div className={classes.heading}>{notification.type}</div>
</div>
<div className={classes.justNow}>{t("APPS_BANK_TIME_JUST_NOW")}</div>
</div>
<div className={classes.message}>{notification.source} sent you ${notification.transferAmount}. <br></br> {notification.message}</div>
</div>
</Notification>
)
}
@@ -0,0 +1,43 @@
import { makeStyles, createStyles, Theme } from "@material-ui/core/styles";
const useStyles = makeStyles((theme: Theme) =>
createStyles({
content: {
padding: theme.spacing(2),
overflowY: 'hidden'
},
title: {
display: "flex",
flexFlow: "row nowrap",
justifyContent: "space-between",
alignItems: "center",
},
titleLeft: {
display: "flex",
flexFlow: "row nowrap",
justifyContent: "flex-start",
alignItems: "center",
},
icon: {
marginTop: "3px",
marginRight: "5px",
},
heading: {
marginBottom: "3px",
},
justNow: {
fontSize: "18px",
fontStyle: "italic",
paddingRight: "3px",
},
message: {
fontSize: "16px",
overflow: "hidden",
display: "-webkit-box",
WebkitLineClamp: 2,
WebkitBoxOrient: "vertical",
},
})
)
export default useStyles;
@@ -6,6 +6,7 @@ import CloseIcon from '@material-ui/icons/Close';
import Nui from '../../../../os/nui-events/utils/Nui';
import { useBankModal} from '../../hooks/useBankModal';
import { Message } from '@material-ui/icons';
const useStyles = makeStyles((theme) => ({
input: {
@@ -50,15 +51,13 @@ export const TransferModal = () => {
}
const addTransfer = () => {
const transferAmount = parseInt(amount);
Nui.send('phone:addTransfer', {
targetID,
amount,
transferAmount,
message
})
setTimeout(() => {
setShowBankModal(false)
}, 200)
setShowBankModal(false)
}
return (
+6 -2
View File
@@ -9,12 +9,16 @@ export const bankState = {
key: 'modalVisibility',
default: false,
}),
bankAlert: atom({
transferSuccessful: atom({
key: 'bankAlert',
default: false
default: null
}),
bankCredentials: atom({
key: 'bankCredentails',
default: null
}),
notification: atom({
key: 'bankNotification',
default: null
})
}
+2 -2
View File
@@ -1,7 +1,7 @@
import { useRecoilState } from 'recoil';
import { bankState } from './state';
export const useBankAlert = () => {
const [ bankAlert, setBankAlert ] = useRecoilState(bankState.bankAlert);
export const useBankAlert = (): any => {
const [ bankAlert, setBankAlert ] = useRecoilState(bankState.transferSuccessful);
return { bankAlert, setBankAlert };
}
@@ -0,0 +1,13 @@
import { useRecoilValue } from 'recoil';
import { Transfer } from '../../../common/interfaces/bank';
import { bankState } from './state';
interface IBankNotification {
notification: Transfer | null;
}
export const useBankNotification = (): IBankNotification => {
const notification = useRecoilValue<Transfer | null>(bankState.notification);
return { notification }
}
+11 -2
View File
@@ -2,12 +2,21 @@ import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { bankState } from './state';
import { useTransactions } from './useTransactions'
import { useCredentials } from './useCredentials';
import { useBankAlert } from './useBankAlert';
import { useSetRecoilState } from 'recoil'
import { useBankNotification } from './useBankNotification';
export const useBankService = () => {
const setTransaction = useSetRecoilState(bankState.transactions)
const setCredentials = useSetRecoilState(bankState.bankCredentials)
const setAlertMessage = useSetRecoilState(bankState.transferSuccessful)
const setNotification = useSetRecoilState(bankState.notification);
///
useNuiEvent('BANK', 'setTransaction', setTransaction);
useNuiEvent('BANK', 'setCredentials', setCredentials)
return {useTransactions, useCredentials};
useNuiEvent('BANK', 'setCredentials', setCredentials);
useNuiEvent('BANK', 'setAlert', setAlertMessage);
useNuiEvent('BANK', 'setNotification', setNotification);
return { useTransactions, useCredentials, useBankAlert, useBankNotification };
}
@@ -8,9 +8,11 @@ import { useApp } from "../../../os/apps/hooks/useApps";
import { AddContactModal } from "./ContactModal";
import { useModal } from "../hooks/useModal";
import { SearchContacts } from "./List/SearchContacts";
import PersonAddIcon from '@material-ui/icons/PersonAdd'
import Fab from '@material-ui/core/Fab';
import { useContactModal } from '../hooks/useContactModal';
import PersonAddIcon from "@material-ui/icons/PersonAdd";
import Fab from "@material-ui/core/Fab";
import { useContactModal } from "../hooks/useContactModal";
import { InfoModal } from "./modal/InfoModal";
import { useContactDetail } from "../hooks/useContactDetail";
const useStyles = makeStyles((theme: Theme) =>
createStyles({
@@ -36,7 +38,7 @@ export const ContactsApp = () => {
const classes = useStyles();
const { showModal, setShowModal } = useModal();
const contacts = useApp("CONTACTS");
const { showContactModal } = useContactModal();
const { contactDetail } = useContactDetail();
const openModal = () => {
setShowModal(true);
@@ -47,6 +49,7 @@ export const ContactsApp = () => {
<AppTitle app={contacts}></AppTitle>
<SearchContacts />
<AddContactModal />
<InfoModal key={contactDetail?.id} />
<div className={showModal ? classes.backgroundModal : undefined} />
<AppContent>
<ContactList />
@@ -1,14 +1,14 @@
import React from "react";
import ListItemText from "@material-ui/core/ListItemText";
import {
Button,
import {
Button,
ListItemAvatar,
Avatar as MuiAvatar,
List,
ListItem,
TextField,
Collapse,
makeStyles
makeStyles,
} from "@material-ui/core";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
@@ -18,39 +18,43 @@ import { useFilteredContacts } from "../../hooks/useFilteredContacts";
import PhoneIcon from "@material-ui/icons/Phone";
import ChatIcon from "@material-ui/icons/Chat";
import MoreVertIcon from "@material-ui/icons/MoreVert";
import { useContacts } from "../../hooks/useContacts";
import { useContactModal } from '../../hooks/useContactModal';
import { useContactModal } from "../../hooks/useContactModal";
import { useContactDetail } from "../../hooks/useContactDetail";
import Nui from "../../../../os/nui-events/utils/Nui";
import "../Contact.css"
import "../Contact.css";
const useStyles = makeStyles((theme) => ({
updateButton: {
margin: 'auto',
margin: "auto",
fontSize: 14,
width: 150,
background: "#2196f3",
marginBottom: 10,
padding: 8
padding: 8,
},
collapseItem: {
margin: 'auto',
width: '50%'
}
}))
margin: "auto",
width: "50%",
},
}));
export const ContactList = () => {
const classes = useStyles()
const classes = useStyles();
const { filteredContacts } = useFilteredContacts();
const { showContactModal, setShowContactModal } = useContactModal();
const { setShowContactModal } = useContactModal();
const { contactDetail, setContactDetail } = useContactDetail();
const contacts = useContacts();
const openContactInfo = () => {
setShowContactModal(!showContactModal);
}
const openContactInfo = (contact) => {
setShowContactModal(true);
setContactDetail(contact);
console.log("CONTACT", contactDetail);
};
const startCall = (number) => {
console.log(number);
Nui.send("phone:startCall", {
@@ -60,52 +64,47 @@ export const ContactList = () => {
return (
<List>
{contacts.contacts.filter(contact => contact.display.includes(filteredContacts) || contact.number.includes(filteredContacts)).map((contact) => (
<>
<ListItem key={contact.id} divider>
<ListItemAvatar>
{contact.avatar ? (
<MuiAvatar src={contact.avatar} />
): (
<MuiAvatar>{contact.display.slice(0, 1).toUpperCase()}</MuiAvatar>
)}
</ListItemAvatar>
<ListItemText primary={contact.display} secondary={contact.number} />
<Button onClick={() => startCall(contact.number)}>
<PhoneIcon />
</Button>
<Button
onClick={() =>
console.log("Message: " + contact.display, contact.number)
}
>
<ChatIcon />
</Button>
<Button onClick={openContactInfo}>
<FontAwesomeIcon icon={faPen} size="lg"/>
</Button>
</ListItem>
<Collapse in={showContactModal} timeout="auto" unmountOnExit>
<List component="div" disablePadding>
<ListItem className={classes.collapseItem}>
<TextField
value={contact.display}
{contacts.contacts
.filter(
(contact) =>
contact.display.includes(filteredContacts) ||
contact.number.includes(filteredContacts)
)
.map((contact) => (
<>
<ListItem key={contact.id} divider>
<ListItemAvatar>
{contact.avatar ? (
<MuiAvatar src={contact.avatar} />
) : (
<MuiAvatar>
{contact.display.slice(0, 1).toUpperCase()}
</MuiAvatar>
)}
</ListItemAvatar>
<ListItemText
primary={contact.display}
secondary={contact.number}
/>
</ListItem>
<ListItem className={classes.collapseItem}>
<TextField
value={contact.number}
/>
</ListItem>
<ListItem className={classes.collapseItem}>
<Button className={classes.updateButton}>
Update contact
<Button onClick={() => startCall(contact.number)}>
<PhoneIcon />
</Button>
<Button
onClick={() =>
console.log("Message: " + contact.display, contact.number)
}
>
<ChatIcon />
</Button>
<Button
style={{ margin: -15 }}
onClick={() => openContactInfo(contact)}
>
<MoreVertIcon />
</Button>
</ListItem>
</List>
</Collapse>
</>
))}
</>
))}
</List>
);
};
@@ -0,0 +1,111 @@
import React, { useState } from "react";
import {
Paper,
Slide,
Button,
TextField,
Avatar as MuiAvatar,
} from "@material-ui/core";
import useStyles from "./modal.styles";
import { useContactModal } from "../../hooks/useContactModal";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import { useTranslation } from "react-i18next";
import { useContactDetail } from "../../hooks/useContactDetail";
import Nui from "../../../../os/nui-events/utils/Nui";
export const InfoModal = () => {
const classes = useStyles();
const { showContactModal, setShowContactModal } = useContactModal();
const { t } = useTranslation();
const { contactDetail, setContactDetail } = useContactDetail();
const [display, setDisplay] = useState(
contactDetail ? contactDetail.display : ""
);
console.log(contactDetail);
const [number, setNumber] = useState(
contactDetail ? contactDetail.number : ""
);
const [avatar, setAvatar] = useState(
contactDetail ? contactDetail.avatar : ""
);
const closeModal = () => {
setShowContactModal(false);
setContactDetail(null);
};
const updateContact = () => {
Nui.send("phone:updateContact", {
id: contactDetail.id,
display,
number,
avatar,
});
setContactDetail(null);
setShowContactModal(false);
};
const deleteContact = () => {
Nui.send("phone:deleteContact", {
id: contactDetail.id,
});
setContactDetail(null);
setShowContactModal(false);
};
return (
<Slide direction="up" in={showContactModal}>
<Paper
className={showContactModal ? classes.modalRoot : classes.modalHide}
>
<Button style={{ margin: 10 }} onClick={closeModal}>
<ArrowBackIcon />
</Button>
<div className={classes.listContainer}>
<MuiAvatar className={classes.avatar} src={avatar} />
<TextField
className={classes.input}
value={display}
onChange={(e) => setDisplay(e.target.value)}
placeholder={t("APPS_CONTACT_FORM_NAME")}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
value={number}
onChange={(e) => setNumber(e.target.value)}
placeholder={t("APPS_CONTACT_FORM_NUMBER")}
fullWidth
inputProps={{
className: classes.inputProps,
}}
/>
<TextField
className={classes.input}
placeholder={t("APPS_CONTACT_FORM_AVATAR")}
fullWidth
value={avatar}
onChange={(e) => setAvatar(e.target.value)}
inputProps={{
className: classes.inputProps,
}}
/>
<div style={{ display: "block" }}>
<Button onClick={updateContact} className={classes.updateButton}>
Update
</Button>
<Button onClick={deleteContact} className={classes.deleteButton}>
Delete
</Button>
</div>
</div>
</Paper>
</Slide>
);
};
@@ -0,0 +1,49 @@
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
modalRoot: {
zIndex: 10,
position: 'absolute',
height: '100%',
width: '100%'
},
modalHide: {
display: 'none'
},
listContainer: {
marginTop: 30,
width: '75%',
margin: '0 auto',
textAlign: 'center',
},
avatar: {
margin: 'auto',
height: '125px',
width: '124px',
marginBottom: 29
},
input: {
marginBottom: 20,
margin: 'auto',
textAlign: 'center',
},
inputProps: {
fontSize: 22
},
updateButton: {
background: '#2196f3',
width: 150,
height: 45,
fontSize: 16,
marginTop: 29,
marginBottom: 29
},
deleteButton: {
background: '#d32f2f',
width: 150,
height: 40,
fontSize: 16
}
}))
export default useStyles;
+4
View File
@@ -16,5 +16,9 @@ export const contactsState = {
showContactsModal: atom({
key: 'showContactModal',
default: false
}),
contactDetail: atom({
key: 'contactDetail',
default: null
})
};
@@ -0,0 +1,7 @@
import { useRecoilState } from 'recoil';
import { contactsState } from './state';
export const useContactDetail = (): any => {
const [ contactDetail, setContactDetail ] = useRecoilState(contactsState.contactDetail);
return { contactDetail, setContactDetail };
}
@@ -3,12 +3,6 @@ import { useRecoilState, atom } from "recoil";
const dialerHistoryState = atom({
key: "dialerHistory",
default: [
{
id: 0,
caller: "Kidz",
phoneNumber: "000-1111",
type: "incoming",
},
{
id: 1,
caller: "ROCKY",
+7
View File
@@ -0,0 +1,7 @@
#notes-app .Mui-focused::after {
border-bottom: 3px solid #f9a825;
}
#notes-app .MuiOutlinedInput-root {
border: 2px soild #f9a825;
}
+48
View File
@@ -0,0 +1,48 @@
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 { NoteModal } from "./modal/NoteModal";
import { Fab } from "@material-ui/core";
import AddIcon from "@material-ui/icons/Add";
import { useNoteModal } from "./hooks/useNoteModal";
import { useNoteDetail } from "./hooks/useNoteDetail";
import useStyles from "./notes.styles";
export const NotesApp = () => {
const { setNoteModal } = useNoteModal();
const { detail, setDetail } = useNoteDetail();
const notes = useNotes();
const classes = useStyles();
const handleModal = () => {
setNoteModal(true);
setDetail(null);
};
return (
<AppWrapper id="notes-app">
<NotesTitle />
<NoteModal key={detail?.id} />
<AppContent>
<NoteList notes={notes} />
<Fab
className={classes.absolute}
onClick={handleModal}
style={{
background: "#f9a825",
color: "#fff",
}}
>
<AddIcon />
</Fab>
</AppContent>
</AppWrapper>
);
};
+20
View File
@@ -0,0 +1,20 @@
import React from 'react'
import { yellow } from "@material-ui/core/colors";
import useStyles from './notes.styles';
import { Paper } from "@material-ui/core";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { faStickyNote } from "@fortawesome/free-solid-svg-icons";
const NotesTitle = () => {
const classes = useStyles()
return (
<Paper elevation={24} square variant="outlined" className={classes.header}>
<FontAwesomeIcon icon={faStickyNote} color={yellow[800]} size="lg" />
</Paper>
)
}
export default NotesTitle;
+16
View File
@@ -0,0 +1,16 @@
import { atom } from 'recoil';
export const noteStates = {
noteItems: atom({
key: 'noteItem',
default: []
}),
noteModal: atom({
key: 'noteModal',
default: false
}),
noteDetail: atom({
key: 'noteDetail',
default: null
})
}
@@ -0,0 +1,7 @@
import { useRecoilState } from 'recoil';
import { noteStates } from './state';
export const useNoteDetail = (): any => {
const [detail, setDetail] = useRecoilState(noteStates.noteDetail);
return { detail, setDetail };
}
@@ -0,0 +1,7 @@
import { useRecoilState } from 'recoil';
import { noteStates } from './state';
export const useNoteModal = () => {
const [noteModal, setNoteModal] = useRecoilState(noteStates.noteModal);
return { noteModal, setNoteModal };
}
+7
View File
@@ -0,0 +1,7 @@
import { useRecoilValue } from 'recoil';
import { noteStates } from './state';
export const useNotes = () => {
const notes = useRecoilValue(noteStates.noteItems);
return notes;
}
@@ -0,0 +1,10 @@
import { useSetRecoilState } from 'recoil'
import { useNuiEvent } from '../../../os/nui-events/hooks/useNuiEvent';
import { useNotes } from './useNotes';
import { noteStates } from './state';
export const useNotesService = () => {
const setNotes = useSetRecoilState(noteStates.noteItems);
useNuiEvent('NOTES', 'setNotes', setNotes);
return useNotes();
}
+28
View File
@@ -0,0 +1,28 @@
import { List, ListItem, ListItemText } from '@material-ui/core';
import React, { useState } from 'react'
import { useNoteModal } from '../hooks/useNoteModal';
import { useNoteDetail } from '../hooks/useNoteDetail';
// add search bar later
const NoteList = ({notes}) => {
const { setNoteModal } = useNoteModal();
const { setDetail } = useNoteDetail();
const handleNoteModal = (note) => {
setNoteModal(true)
setDetail(note)
}
return (
<List>
{notes.map((note) => (
<ListItem key={note.id} button divider onClick={() => handleNoteModal(note)}>
<ListItemText><strong>{note.title}</strong></ListItemText>
</ListItem>
))}
</List>
)
}
export default NoteList;
+116
View File
@@ -0,0 +1,116 @@
import {
Button,
TextField,
Slide,
} from "@material-ui/core";
import React, { useState } from "react";
import ArrowBackIcon from "@material-ui/icons/ArrowBack";
import { useNoteModal } from "../hooks/useNoteModal";
import { useNoteDetail } from "../hooks/useNoteDetail";
import useStyles from "./modal.styles";
import "../NotesApp.css";
import Nui from "../../../os/nui-events/utils/Nui";
export const NoteModal = () => {
const { noteModal, setNoteModal } = useNoteModal();
const { detail, setDetail } = useNoteDetail();
console.log(detail);
const [title, setTitle] = useState(detail ? detail.title : "");
const [content, setContent] = useState(detail ? detail.content : "");
const classes = useStyles();
const _handleClose = () => {
setNoteModal(false);
setDetail(null);
};
const handleNoteSave = () => {
setNoteModal(false);
setDetail(null);
Nui.send("phone:addNote", {
title,
content,
});
};
const handleDeleteNote = () => {
const id = detail.id;
setNoteModal(false);
Nui.send("phone:deleteNote", {
id,
});
setDetail(null);
};
const handleUpdateNote = () => {
Nui.send("phone:updateNote", {
id: detail.id,
title,
content,
});
setNoteModal(false);
setDetail(null);
};
return (
<div className={noteModal ? classes.modalRoot : classes.modalHide}>
<Slide direction="left" in={noteModal} mountOnEnter unmountOnExit>
<div>
<Button className={classes.closeButton} onClick={_handleClose}>
<ArrowBackIcon />
</Button>
<div id="notes-modal" className={classes.noteContainer}>
<TextField
className={classes.input}
placeholder="Title"
inputProps={{
className: classes.inputPropsTitle,
}}
fullWidth
value={title}
onChange={(e) => setTitle(e.target.value)}
/>
<TextField
className={classes.input}
inputProps={{
className: classes.inputPropsContent,
}}
placeholder="Content"
multiline
fullWidth
rows={19}
variant="outlined"
value={content}
onChange={(e) => setContent(e.target.value)}
/>
{!detail && (
<Button className={classes.saveButton} onClick={handleNoteSave}>
Save
</Button>
)}
{detail && (
<Button
className={classes.updateButton}
onClick={handleUpdateNote}
>
Update
</Button>
)}
{detail && (
<Button
className={classes.deleteButton}
onClick={handleDeleteNote}
>
Delete
</Button>
)}
</div>
</div>
</Slide>
</div>
);
};
@@ -0,0 +1,49 @@
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
modalRoot: {
zIndex: 20,
position: "absolute",
height: '100%',
width: '100%',
background: '#232323',
},
modalHide: {
display: 'none'
},
closeButton: {
width: '10%',
position: 'absolute',
top: 10,
left: 0
},
noteContainer: {
width: '90%',
marginTop: 80,
margin: '0 auto',
},
input: {
marginBottom: 20,
},
inputPropsTitle: {
fontSize: 28,
},
inputPropsContent: {
fontSize: 20,
},
saveButton: {
background: '#f9a825',
padding: '10px 30px'
},
updateButton: {
background: '#f9a825',
padding: '10px 30px',
marginRight: '8px'
},
deleteButton: {
background: '#c62828',
padding: '10px 30px'
}
}))
export default useStyles;
+30
View File
@@ -0,0 +1,30 @@
import { makeStyles } from '@material-ui/core';
const useStyles = makeStyles((theme) => ({
header: {
width: '100%',
display: 'flex',
flexFlow: 'row nowrap',
justifyContent: 'center',
alignItems: 'center',
textAlign: 'center',
height: '60px',
},
backgroundModal: {
background: "black",
opacity: "0.6",
position: "absolute",
top: 0,
left: 0,
right: 0,
bottom: 0,
zIndex: 5,
},
absolute: {
position: "absolute",
bottom: theme.spacing(2),
right: theme.spacing(3),
},
}))
export default useStyles;