React/Material-UIでCard
10019 ワード
./src/App.js
import logo from "./logo.svg";
import "./App.css";
import { Card, CardContent, Grid, Typography } from "@material-ui/core";
import LocalHospitalIcon from "@material-ui/icons/LocalHospital";
import CloseIcon from "@material-ui/icons/Close";
import DirectionsRunIcon from "@material-ui/icons/DirectionsRun";
import FavoriteIcon from "@material-ui/icons/Favorite";
function App() {
return (
<div>
<Grid container spacing={1}>
<Grid item xs={3} color="primary">
<Card style={{ backgroundColor: "#0095d9" }}>
<CardContent>
<Typography variant="h5">622,273</Typography>
<Typography>
<LocalHospitalIcon />
Confirmed
</Typography>
</CardContent>
</Card>
</Grid>
<Grid item xs={3}>
<Card style={{ backgroundColor: "#e60033" }}>
<CardContent>
<Typography variant="h5">10,566</Typography>
<Typography>
<CloseIcon />
Deaths
</Typography>
</CardContent>
</Card>
</Grid>
<Grid item xs={3}>
<Card style={{ backgroundColor: "#3eb370" }}>
<CardContent>
<Typography variant="h5">542,413</Typography>
<Typography>
<DirectionsRunIcon />
Recovered
</Typography>
</CardContent>
</Card>
</Grid>
<Grid item xs={3}>
<Card style={{ backgroundColor: "#ffd900" }}>
<CardContent>
<Typography variant="h5">69,294</Typography>
<Typography>
<FavoriteIcon />
Active
</Typography>
</CardContent>
</Card>
</Grid>
</Grid>
</div>
);
}
export default App;
Author And Source
この問題について(React/Material-UIでCard), 我々は、より多くの情報をここで見つけました https://qiita.com/yono2844/items/6946b810c7f1d5db8453著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .