import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; import { Tabs, Tab, Typography } from '@material-ui/core'; const styles = theme => ({ root: { flexGrow: 1, backgroundColor: theme.palette.background.paper, }, tabsRoot: { borderBottom: '1px solid #e8e8e8', }, tabsIndicator: { backgroundColor: '#1890ff', }, tabRoot: { textTransform: 'initial', minWidth: 64, [theme.breakpoints.up('sm')]: { minWidth: 72, }, fontWeight: theme.typography.fontWeightRegular, marginRight: theme.spacing(4), fontFamily: [ '-apple-system', 'BlinkMacSystemFont', '"Segoe UI"', 'Roboto', '"Helvetica Neue"', 'Arial', 'sans-serif', '"Apple Color Emoji"', '"Segoe UI Emoji"', '"Segoe UI Symbol"', ].join(','), '&:hover': { color: '#40a9ff', opacity: 1, }, '&$tabSelected': { color: '#1890ff', fontWeight: theme.typography.fontWeightMedium, }, '&:focus': { color: '#40a9ff', }, }, tabSelected: {}, typography: { padding: theme.spacing(3), }, }); class CustomTabs extends React.Component { state = { value: 0, }; handleChange = (event, value) => { this.setState({ value }); }; render() { const { classes } = this.props; const { value } = this.state; return (
powered by Material-UI
); } } CustomTabs.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(CustomTabs);