Advertisement
DnS_PRODUCTS

JS scripts

Mar 25th, 2019
242
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ==== DEMO.JS ===================================================================================================================
  2. ================================================================================================================================
  3.  
  4. import React from 'node_modules/react';
  5. import PropTypes from 'node_modules/prop-types';
  6. import { withStyles } from 'node_modules/@material-ui/core/styles';
  7. import AppBar from 'node_modules/@material-ui/core/AppBar';
  8. import Toolbar from 'node_modules/@material-ui/core/Toolbar';
  9. import Typography from 'node_modules/@material-ui/core/Typography';
  10. import Button from 'node_modules/@material-ui/core/Button';
  11. import IconButton from 'node_modules/@material-ui/core/IconButton';
  12. import MenuIcon from 'node_modules/@material-ui/icons/Menu';
  13.  
  14. const styles = {
  15.   root: {
  16.     flexGrow: 1,
  17.   },
  18.   grow: {
  19.     flexGrow: 1,
  20.   },
  21.   menuButton: {
  22.     marginLeft: -12,
  23.     marginRight: 20,
  24.   },
  25. };
  26.  
  27. function ButtonAppBar(props) {
  28.   const { classes } = props;
  29.   return (
  30.     <div className={classes.root}>
  31.       <AppBar position="static">
  32.         <Toolbar>
  33.           <IconButton className={classes.menuButton} color="inherit" aria-label="Menu">
  34.             <MenuIcon />
  35.           </IconButton>
  36.           <Typography variant="h6" color="inherit" className={classes.grow}>
  37.             News
  38.           </Typography>
  39.           <Button color="inherit">Login</Button>
  40.         </Toolbar>
  41.       </AppBar>
  42.     </div>
  43.   );
  44. }
  45.  
  46. ButtonAppBar.propTypes = {
  47.   classes: PropTypes.object.isRequired,
  48. };
  49.  
  50. export default withStyles(styles)(ButtonAppBar);
  51.  
  52. =========================================================================================================================
  53. =============================================================== index.js ================================================
  54. =========================================================================================================================
  55.  
  56. import React from 'node_modules/react';
  57. import ReactDOM from 'node_modules/react-dom';
  58. import Demo from './demo';
  59.  
  60. ReactDOM.render(<Demo />, document.getElementById("root"));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement