김대휘

Changed to material-ui

This diff could not be displayed because it is too large.
......@@ -3,14 +3,14 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@material-ui/core": "^4.10.1",
"@material-ui/icons": "^4.9.1",
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2",
"@testing-library/user-event": "^7.1.2",
"bootstrap": "^4.5.0",
"react": "^16.13.1",
"react-dom": "^16.13.1",
"react-scripts": "3.4.1",
"reactstrap": "^8.4.1"
"react-scripts": "3.4.1"
},
"scripts": {
"start": "react-scripts start",
......
......@@ -9,35 +9,14 @@
name="description"
content="Web site created using create-react-app"
/>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<title>Do-gether</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>
......
import React from "react";
import { Container, Row, Col } from "reactstrap";
import NavBar from "./NavBar.js";
import TodoCard from "./TodoCard.js";
import NavBar from "./components/NavBar.js";
import BodyLayout from "./components/BodyLayout.js";
function App() {
return (
<>
<NavBar></NavBar>
<Container style={{ paddingTop: "4rem" }}>
<Row xs="2" sm="2" md="4">
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
<Col>
<TodoCard />
</Col>
</Row>
</Container>
<NavBar />
<BodyLayout />
</>
);
}
export default App;
\ No newline at end of file
export default App;
......
import React, { useState } from 'react';
import { Collapse, Navbar, NavbarToggler, NavbarBrand, Nav, NavItem, NavLink } from 'reactstrap';
const NavBar = (props) => {
const [collapsed, setCollapsed] = useState(true);
const toggleNavbar = () => setCollapsed(!collapsed);
return (
<div>
<Navbar style={{backgroundColor:"rgba(0,0,0,0.5)"}} light fixed="top">
<NavbarBrand href="/" className="mr-auto" style={{marginLeft:"auto",marginRight:"auto"}}>Do-gether</NavbarBrand>
<NavbarToggler onClick={toggleNavbar} className="mr-2"/>
<Collapse isOpen={!collapsed} navbar>
<Nav navbar>
<NavItem>
<NavLink href="/components/">Components</NavLink>
</NavItem>
<NavItem>
<NavLink href="www.google.com">GitHub</NavLink>
</NavItem>
</Nav>
</Collapse>
</Navbar>
</div>
);
}
export default NavBar;
\ No newline at end of file
import React from "react";
import { Card, Button, CardTitle, CardText, Row, Col } from "reactstrap";
function TodoCard(props) {
return (
<>
<Card body style={{ marginBottom: "1rem" }}>
<CardTitle>Special Title Treatment</CardTitle>
<CardText>
With supporting text below as a natural lead-in to additional helod.
</CardText>
<Button>Go somewhere</Button>
</Card>
</>
);
}
export default TodoCard;
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import Grid from "@material-ui/core/Grid";
import Container from "@material-ui/core/Container";
import TodoCard from "./TodoCard.js";
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1,
marginTop: "1rem",
},
item: {
marginLeft: "auto",
marginRight: "auto",
},
}));
export default function CenteredGrid() {
const classes = useStyles();
return (
<Container className={classes.root} maxwidth="sm">
<Grid className={classes.item} container spacing={3}>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
<Grid item xs="6" sm="6" md="3">
<TodoCard></TodoCard>
</Grid>
</Grid>
</Container>
);
}
import React from 'react';
import { makeStyles } from '@material-ui/core/styles';
import AppBar from '@material-ui/core/AppBar';
import Toolbar from '@material-ui/core/Toolbar';
import Typography from '@material-ui/core/Typography';
import Button from '@material-ui/core/Button';
import IconButton from '@material-ui/core/IconButton';
import MenuIcon from '@material-ui/icons/Menu';
const useStyles = makeStyles((theme) => ({
root: {
flexGrow: 1
},
bar:{
backgroundColor:"rgba(0,0,0,0.8)"
},
menuButton: {
marginRight: theme.spacing(2),
},
title: {
flexGrow: 1,
},
}));
export default function ButtonAppBar() {
const classes = useStyles();
return (
<div className={classes.root}>
<AppBar className={classes.bar} position="static">
<Toolbar>
<IconButton edge="start" className={classes.menuButton} color="inherit" aria-label="menu">
<MenuIcon />
</IconButton>
<Typography variant="h6" className={classes.title}>
Fuck
</Typography>
<Button color="inherit">Login</Button>
</Toolbar>
</AppBar>
</div>
);
}
\ No newline at end of file
import React from "react";
import { makeStyles } from "@material-ui/core/styles";
import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import Button from "@material-ui/core/Button";
import Typography from "@material-ui/core/Typography";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Checkbox from "@material-ui/core/Checkbox";
const useStyles = makeStyles({
root: {
},
title: {
fontSize: 14,
},
pos: {
marginBottom: 12,
},
});
export default function SimpleCard() {
const classes = useStyles();
return (
<Card className={classes.root}>
<CardContent>
<Typography
className={classes.title}
color="textSecondary"
gutterBottom
>
2020-03-26
</Typography>
<Typography variant="h5" component="h2">
Todo Main
</Typography>
<div>
<FormControlLabel
control={<Checkbox name="checkedC" />}
label="똥싸기"
/>
</div>
<div>
<FormControlLabel
control={<Checkbox name="checkedC" />}
label="똥싸기"
/>
</div>
<div>
<FormControlLabel
control={<Checkbox name="checkedC" />}
label="똥싸기"
/>
</div>
<Button size="small">Learn More</Button>
</CardContent>
</Card>
);
}
import React from "react";
import ReactDOM from "react-dom";
import "bootstrap/dist/css/bootstrap.min.css";
import "./index.css";
import App from "./App";
......