React/Material-UIで簡単なUI
6940 ワード
Material-UIのインストール
$ npm install @material-ui/core
Material-UIでUI作成
~/Desktop/sample-app/src/components/MySample.js
import React from "react";
import {
AppBar,
Container,
Toolbar,
Typography,
Grid,
} from "@material-ui/core";
const MySample = () => {
return (
<div>
<AppBar position="static">
<Toolbar>
<Typography>Iris Dashboard</Typography>
</Toolbar>
</AppBar>
<Container>
<Grid container>
<Grid item xs={12}>
AAA
</Grid>
<Grid item xs={6}>
AAA
</Grid>
<Grid item xs={6}>
BBB
</Grid>
<Grid item xs={4}>
AAA
</Grid>
<Grid item xs={4}>
BBB
</Grid>
<Grid item xs={4}>
CCC
</Grid>
</Grid>
</Container>
</div>
);
};
export default MySample;
~/Desktop/sample-app/src/App.js
import logo from "./logo.svg";
import "./App.css";
import MySample1 from "./components/MySample";
function App() {
return (
<div className="App">
<MySample />
</div>
);
}
export default App;
Author And Source
この問題について(React/Material-UIで簡単なUI), 我々は、より多くの情報をここで見つけました https://qiita.com/yono2844/items/e43af23f12cf6bb3954b著者帰属:元の著者の情報は、元の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 .