import React from "react"; import AppBar from "@material-ui/core/AppBar"; import Toolbar from "@material-ui/core/Toolbar"; import IconButton from "@material-ui/core/IconButton"; import Typography from "@material-ui/core/Typography"; import InputBase from "@material-ui/core/InputBase"; import Badge from "@material-ui/core/Badge"; import MenuItem from "@material-ui/core/MenuItem"; import Menu from "@material-ui/core/Menu"; import { fade } from "@material-ui/core/styles/colorManipulator"; import { withStyles } from "@material-ui/core/styles"; import MenuIcon from "@material-ui/icons/Menu"; import SearchIcon from "@material-ui/icons/Search"; import AccountCircle from "@material-ui/icons/AccountCircle"; import MailIcon from "@material-ui/icons/Mail"; import NotificationsIcon from "@material-ui/icons/Notifications"; import MoreIcon from "@material-ui/icons/MoreVert"; import { FaGithub, FaNpm } from "react-icons/fa"; const styles = theme => ({ root: { width: "100%" }, grow: { flexGrow: 1 }, menuButton: { marginLeft: -12, marginRight: 20 }, title: { display: "flex", [theme.breakpoints.up("sm")]: { display: "block" } }, search: { position: "relative", borderRadius: theme.shape.borderRadius, backgroundColor: fade(theme.palette.common.white, 0.15), "&:hover": { backgroundColor: fade(theme.palette.common.white, 0.25) }, marginRight: theme.spacing.unit * 2, marginLeft: 0, width: "100%", [theme.breakpoints.up("sm")]: { marginLeft: theme.spacing.unit * 3, width: "auto" } }, searchIcon: { width: theme.spacing.unit * 9, height: "100%", position: "absolute", pointerEvents: "none", display: "flex", alignItems: "center", justifyContent: "center" }, inputRoot: { color: "inherit", width: "100%" }, inputInput: { paddingTop: theme.spacing.unit, paddingRight: theme.spacing.unit, paddingBottom: theme.spacing.unit, paddingLeft: theme.spacing.unit * 10, transition: theme.transitions.create("width"), width: "100%", [theme.breakpoints.up("md")]: { width: 200 } } }); class PrimarySearchAppBar extends React.Component { state = { anchorEl: null, mobileMoreAnchorEl: null }; handleProfileMenuOpen = event => { this.setState({ anchorEl: event.currentTarget }); }; handleMenuClose = () => { this.setState({ anchorEl: null }); this.handleMobileMenuClose(); }; handleMobileMenuOpen = event => { this.setState({ mobileMoreAnchorEl: event.currentTarget }); }; handleMobileMenuClose = () => { this.setState({ mobileMoreAnchorEl: null }); }; render() { const { anchorEl, mobileMoreAnchorEl } = this.state; const { classes } = this.props; const isMenuOpen = Boolean(anchorEl); const isMobileMenuOpen = Boolean(mobileMoreAnchorEl); const renderMenu = ( Profile My account ); const renderMobileMenu = (

Messages

Notifications

Profile

); return (
React-multi-carousel - a carousel that rocks
Doc{" "} w3js- web front-end studio
{renderMenu} {renderMobileMenu}
); } } export default withStyles(styles)(PrimarySearchAppBar);