File tree Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Expand file tree Collapse file tree 1 file changed +7
-13
lines changed Original file line number Diff line number Diff line change 1
1
import React , { ReactNode } from 'react' ;
2
- import PropTypes from 'prop-types' ;
3
- import { makeStyles } from '@material-ui/core/styles' ;
2
+ import { makeStyles , Theme } from '@material-ui/core/styles' ;
4
3
import Grid , { GridProps } from '@material-ui/core/Grid' ;
5
4
6
- const styles = {
5
+ const useStyles = makeStyles ( ( theme : Theme ) => ( {
7
6
grid : {
8
7
padding : '0 15px !important' ,
9
8
} ,
10
- } ;
11
-
12
- const useStyles = makeStyles ( styles ) ;
9
+ } ) ) ;
13
10
14
- interface GridItemProps extends GridProps {
11
+ export interface GridItemProps extends GridProps {
15
12
children ?: ReactNode ;
16
13
}
17
14
18
- export default function GridItem ( props : GridItemProps ) {
15
+ const GridItem : React . FC < GridItemProps > = ( { children , ... rest } ) => {
19
16
const classes = useStyles ( ) ;
20
- const { children, ...rest } = props ;
21
17
return (
22
18
< Grid item { ...rest } className = { classes . grid } >
23
19
{ children }
24
20
</ Grid >
25
21
) ;
26
- }
27
-
28
- GridItem . propTypes = {
29
- children : PropTypes . node ,
30
22
} ;
23
+
24
+ export default GridItem ;
You can’t perform that action at this time.
0 commit comments