react Пример компонента с закрывающим тегом
Primary tabs
Например (в стиле хуков):
import React from 'react'; import PropTypes from 'prop-types'; import { withStyles } from '@material-ui/core/styles'; const styles = theme => ({ formSection: { 'margin-top': '20px', } }); function FormSection(props) { const { classes } = props; return ( <div className={classes.formSection}> {props.children} </div> ); } FormSection.propTypes = { classes: PropTypes.object.isRequired, }; export default withStyles(styles)(FormSection);
- Log in to post comments
- 1413 reads