import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { AppBar, Tabs, Tab, Typography } from '@material-ui/core'; function TabContainer(props) { return ( {props.children} ); } TabContainer.propTypes = { children: PropTypes.node.isRequired, }; const styles = theme => ({ root: { flexGrow: 1, width: '100%', backgroundColor: theme.palette.background.paper, }, }); class ScrollTabs extends React.Component { state = { value: 0, }; handleChange = (event, value) => { this.setState({ value }); }; render() { const { classes } = this.props; const { value } = this.state; return (
{value === 0 && Item One} {value === 1 && Item Two} {value === 2 && Item Three} {value === 3 && Item Four} {value === 4 && Item Five} {value === 5 && Item Six} {value === 6 && Item Seven}
); } } ScrollTabs.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(ScrollTabs);