@@ -3,30 +3,28 @@ import Button from "@mui/material/Button";
3
3
import GitHubIcon from "@mui/icons-material/GitHub" ;
4
4
import KeyIcon from "@mui/icons-material/VpnKey" ;
5
5
import Box from "@mui/material/Box" ;
6
+ import { type FC } from "react" ;
7
+ import { useTheme } from "@emotion/react" ;
6
8
import { Language } from "./SignInForm" ;
7
- import { AuthMethods } from "api/typesGenerated" ;
8
- import { FC } from "react" ;
9
- import { makeStyles } from "@mui/styles" ;
9
+ import { type AuthMethods } from "api/typesGenerated" ;
10
10
11
11
type OAuthSignInFormProps = {
12
12
isSigningIn : boolean ;
13
13
redirectTo : string ;
14
14
authMethods ?: AuthMethods ;
15
15
} ;
16
16
17
- const useStyles = makeStyles ( ( theme ) => ( {
18
- buttonIcon : {
19
- width : theme . spacing ( 2 ) ,
20
- height : theme . spacing ( 2 ) ,
21
- } ,
22
- } ) ) ;
23
-
24
17
export const OAuthSignInForm : FC < OAuthSignInFormProps > = ( {
25
18
isSigningIn,
26
19
redirectTo,
27
20
authMethods,
28
21
} ) => {
29
- const styles = useStyles ( ) ;
22
+ const theme = useTheme ( ) ;
23
+
24
+ const iconStyles = {
25
+ width : theme . spacing ( 2 ) ,
26
+ height : theme . spacing ( 2 ) ,
27
+ } ;
30
28
31
29
return (
32
30
< Box display = "grid" gap = "16px" >
@@ -37,7 +35,7 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
37
35
) } `}
38
36
>
39
37
< Button
40
- startIcon = { < GitHubIcon className = { styles . buttonIcon } /> }
38
+ startIcon = { < GitHubIcon css = { iconStyles } /> }
41
39
disabled = { isSigningIn }
42
40
fullWidth
43
41
type = "submit"
@@ -61,10 +59,10 @@ export const OAuthSignInForm: FC<OAuthSignInFormProps> = ({
61
59
< img
62
60
alt = "Open ID Connect icon"
63
61
src = { authMethods . oidc . iconUrl }
64
- className = { styles . buttonIcon }
62
+ css = { iconStyles }
65
63
/>
66
64
) : (
67
- < KeyIcon className = { styles . buttonIcon } />
65
+ < KeyIcon css = { iconStyles } />
68
66
)
69
67
}
70
68
disabled = { isSigningIn }
0 commit comments