various changes

This commit is contained in:
Taehee Choi 2022-02-28 21:37:40 -08:00
parent 2dccfc758b
commit 0ef11f7f74
5 changed files with 40 additions and 25 deletions

View File

@ -1,5 +1,6 @@
import React from "react"; import React from "react";
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import { BrowserRouter as Router, Routes, Route } from "react-router-dom";
import "./styles.css";
import Home from "./components/home/Home"; import Home from "./components/home/Home";
import Contacts from "./components/contacts/Contacts"; import Contacts from "./components/contacts/Contacts";

View File

@ -1,10 +1,21 @@
import React from "react"; import React from "react";
import { Box, Button } from "@mui/material"; import { Box } from "@mui/material";
import IconButton, { IconButtonProps } from "@mui/material/IconButton";
import { styled } from "@mui/material/styles";
import GroupsIcon from "@mui/icons-material/Groups"; import GroupsIcon from "@mui/icons-material/Groups";
import AddIcon from "@mui/icons-material/Add"; import AddIcon from "@mui/icons-material/Add";
import CallIcon from "@mui/icons-material/Call"; import CallIcon from "@mui/icons-material/Call";
import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord"; import FiberManualRecordIcon from "@mui/icons-material/FiberManualRecord";
const StyledIconButton = styled(IconButton)<IconButtonProps>(({ theme }) => ({
borderColor: theme.palette.secondary.main,
borderRadius: 10,
borderStyle: "solid",
borderWidth: 3,
width: 150,
height: 150,
}));
const Home: React.FC = () => { const Home: React.FC = () => {
return ( return (
<Box <Box
@ -14,43 +25,39 @@ const Home: React.FC = () => {
height: "75%", height: "75%",
}} }}
> >
<Box sx={{ flexGrow: 1 }}>hi</Box> <Box sx={{ width: "50%" }}>hi</Box>
<Box <Box
sx={{ sx={{
display: "flex", display: "flex",
flexDirection: "row", flexDirection: "row",
flexGrow: 1, width: "50%",
alignItems: "center", alignItems: "center",
justifyContent: "space-evenly", justifyContent: "space-evenly",
flexWrap: "wrap",
}} }}
> >
<Box> <Box>
<Button <StyledIconButton>
color="secondary" <GroupsIcon sx={{ transform: "scale(3)" }} color="secondary" />
variant="outlined" </StyledIconButton>
startIcon={<GroupsIcon />}
></Button>
</Box> </Box>
<Box> <Box>
<Button <StyledIconButton>
color="secondary" <AddIcon sx={{ transform: "scale(3)" }} color="secondary" />
variant="outlined" </StyledIconButton>
startIcon={<GroupsIcon />}
></Button>
</Box> </Box>
<Box> <Box>
<Button <StyledIconButton>
color="secondary" <CallIcon sx={{ transform: "scale(3)" }} color="secondary" />
variant="outlined" </StyledIconButton>
startIcon={<GroupsIcon />}
></Button>
</Box> </Box>
<Box> <Box>
<Button <StyledIconButton>
<FiberManualRecordIcon
sx={{ transform: "scale(3)" }}
color="secondary" color="secondary"
variant="outlined" />
startIcon={<GroupsIcon />} </StyledIconButton>
></Button>
</Box> </Box>
</Box> </Box>
</Box> </Box>

View File

@ -5,7 +5,7 @@ import React, { useState, useEffect } from "react";
import CalendarTodayIcon from "@mui/icons-material/CalendarToday"; import CalendarTodayIcon from "@mui/icons-material/CalendarToday";
import AccessTimeIcon from "@mui/icons-material/AccessTime"; import AccessTimeIcon from "@mui/icons-material/AccessTime";
const FormattedBox = styled(Box)<BoxProps>(({ theme }) => ({ const FormattedBox = styled(Box)<BoxProps>(() => ({
marginRight: 12, marginRight: 12,
})); }));

View File

@ -20,7 +20,7 @@ const Navbar: React.FC = () => {
<img src={pngLogo} alt="Kitty Katty!" style={{ maxWidth: 130 }} /> <img src={pngLogo} alt="Kitty Katty!" style={{ maxWidth: 130 }} />
</IconButton> </IconButton>
{pages.map((page, i) => ( {pages.map((page, i) => (
<Box flexGrow={i == pages.length - 1 ? 1 : 0} sx={{ mr: 3 }}> <Box flexGrow={i == pages.length - 1 ? 1 : 0} sx={{ mr: 3 }} key={i}>
<Typography <Typography
variant="h6" variant="h6"
color="inherit" color="inherit"

7
src/styles.css Normal file
View File

@ -0,0 +1,7 @@
html,
body,
#app,
#root,
#app > div {
height: 100%;
}