I'm fairly new to React JS and have just started building a simple React app. I'm trying to place two buttons on each side using CSS flex, but I'm having trouble achieving it. Can anyone help point out where I might be going wrong?
import React, { Component } from "react";
import PropTypes from "prop-types";
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";
const styles = {
root: {
display:'flex',
justifyContent: 'space-between',
width:'100%'
},
};
class Header extends Component {
render() {
return (
<div className={styles.root}>
<button>news</button>
<button >login</button>
</div>
);
}
}
export default Header;
The two icons, News and Login, should be in two corners of the AppBar.