Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ==== DEMO.JS ===================================================================================================================
- ================================================================================================================================
- import React from 'node_modules/react';
- import PropTypes from 'node_modules/prop-types';
- import { withStyles } from 'node_modules/@material-ui/core/styles';
- import AppBar from 'node_modules/@material-ui/core/AppBar';
- import Toolbar from 'node_modules/@material-ui/core/Toolbar';
- import Typography from 'node_modules/@material-ui/core/Typography';
- import Button from 'node_modules/@material-ui/core/Button';
- import IconButton from 'node_modules/@material-ui/core/IconButton';
- import MenuIcon from 'node_modules/@material-ui/icons/Menu';
- const styles = {
- root: {
- flexGrow: 1,
- },
- grow: {
- flexGrow: 1,
- },
- menuButton: {
- marginLeft: -12,
- marginRight: 20,
- },
- };
- function ButtonAppBar(props) {
- const { classes } = props;
- return (
- <div className={classes.root}>
- <AppBar position="static">
- <Toolbar>
- <IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
- <MenuIcon />
- </IconButton>
- <Typography variant="h6" color="inherit" className={classes.grow}>
- News
- </Typography>
- <Button color="inherit">Login</Button>
- </Toolbar>
- </AppBar>
- </div>
- );
- }
- ButtonAppBar.propTypes = {
- classes: PropTypes.object.isRequired,
- };
- export default withStyles(styles)(ButtonAppBar);
- =========================================================================================================================
- =============================================================== index.js ================================================
- =========================================================================================================================
- import React from 'node_modules/react';
- import ReactDOM from 'node_modules/react-dom';
- import Demo from './demo';
- ReactDOM.render(<Demo />, document.getElementById("root"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement