working typescript version

This commit is contained in:
erik-sn committed 2020-10-07 12:19:55 -04:00
1 parent 581d6011e0
commit cff746aa38
119 files changed
+247 -189

No files matched your search

@@ -0,0 +1,52 @@
import React, { useState } from "react";
import { makeStyles } from "@material-ui/core/styles";
import { AppWrapper } from "../../../ui/components";
import { AppTitle } from "../../../ui/components/AppTitle";
import { AppContent } from "../../../ui/components/AppContent";
import { ContactList } from "./ContactList";
import { useApp } from "../../../os/apps/hooks/useApps";
import AddCircleIcon from "@material-ui/icons/AddCircle";
import { AddContactModal } from "./ContactModal";
import { Button } from "@material-ui/core";
const useStyles = makeStyles((theme) => ({
modalOpener: {
backgroundColor: "red",
height: 50,
position: "fixed",
display: "flex",
justifyContent: "center",
alignItems: "center",
},
}));
export const ContactsApp = () => {
const [modal, setModal] = useState(false);
const classes = useStyles();
const contacts = useApp("CONTACTS");
const openModal = () => {
setModal(true);
};
const closeModal = () => {
setModal(false);
};
return (
<AppWrapper>
<AppTitle app={contacts}></AppTitle>
<Button
onClick={openModal}
variant="contained"
style={{ backgroundColor: "#232323" }}
>
<AddCircleIcon color="action" />
</Button>
<AppContent>
<AddContactModal show={modal} handleClose={closeModal} />
<ContactList />
</AppContent>
</AppWrapper>
);
};