March 2019
Intermediate to advanced
534 pages
14h 52m
English
Let's assume that your app renders AppBar components on several screens. Each AppBar component also renders Menu and title to the left, as well as Button to the right. Here's how you can implement your own AppBar component so that it's easier to use on several screens:
import React, { Fragment, Component } from 'react';import { withStyles } 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';import Menu from '@material-ui/core/Menu';import MenuItem from ...Read now
Unlock full access