File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed
hooks/13_LoginForm/src/pages Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,19 @@ interface PropsForm {
7474 loginInfo : LoginEntity ;
7575}
7676
77+ // https://material-ui.com/styles/api/#makestyles-styles-options-hook
78+ const useFormStyles = makeStyles ( theme =>
79+ createStyles ( {
80+ formContainer : {
81+ display : "flex" ,
82+ flexDirection : "column" ,
83+ justifyContent : "center"
84+ }
85+ } )
86+ ) ;
87+
7788const LoginForm = ( props : PropsForm ) => {
89+ const classes = useFormStyles ( ) ;
7890 const { onLogin, onUpdateField, loginInfo } = props ;
7991
8092 // TODO: Enhacement move this outside the stateless component discuss why is a good idea
@@ -83,13 +95,7 @@ const LoginForm = (props: PropsForm) => {
8395 } ;
8496
8597 return (
86- < div
87- style = { {
88- display : "flex" ,
89- flexDirection : "column" ,
90- justifyContent : "center"
91- } }
92- >
98+ < div className = { classes . formContainer } >
9399 < TextField
94100 label = "Name"
95101 margin = "normal"
You can’t perform that action at this time.
0 commit comments