1- /* eslint-disable react/prop-types */
21import React from 'react' ;
2+ import PropTypes from 'prop-types' ;
33import { Grid , Button as MUIButton , Typography } from '@material-ui/core' ;
44import { makeStyles } from '@material-ui/core/styles' ;
55
@@ -13,31 +13,57 @@ const useStyles = makeStyles(() => ({
1313} ) ) ;
1414
1515const Form = ( { children, ...props } ) => < form { ...props } > { children } </ form > ;
16+
17+ Form . propTypes = {
18+ children : PropTypes . node
19+ } ;
20+
1621const Description = ( { children } ) => (
1722 < Grid item xs = { 12 } >
1823 < Typography variant = "body1" gutterBottom >
1924 { children }
2025 </ Typography >
2126 </ Grid >
2227) ;
28+
29+ Description . propTypes = {
30+ children : PropTypes . node
31+ } ;
32+
2333const Title = ( { children } ) => (
2434 < Grid item xs = { 12 } >
2535 < Typography variant = "h3" gutterBottom >
2636 { children }
2737 </ Typography >
2838 </ Grid >
2939) ;
40+
41+ Title . propTypes = {
42+ children : PropTypes . node
43+ } ;
44+
3045const ButtonGroup = ( { children } ) => {
3146 const classes = useStyles ( ) ;
3247 return < div className = { classes . buttonGroup } > { children } </ div > ;
3348} ;
3449
50+ ButtonGroup . propTypes = {
51+ children : PropTypes . node
52+ } ;
53+
3554const Button = ( { label, variant, children, buttonType, ...props } ) => (
3655 < MUIButton color = { variant } variant = "contained" { ...props } >
3756 { label || children }
3857 </ MUIButton >
3958) ;
4059
60+ Button . propTypes = {
61+ children : PropTypes . node ,
62+ label : PropTypes . node ,
63+ variant : PropTypes . string ,
64+ buttonType : PropTypes . string
65+ } ;
66+
4167const MuiFormTemplate = ( props ) => (
4268 < FormTemplate FormWrapper = { Form } Button = { Button } ButtonGroup = { ButtonGroup } Title = { Title } Description = { Description } { ...props } />
4369) ;
0 commit comments