1
- import { makeStyles } from "@mui/styles " ;
1
+ import { css , useTheme } from "@emotion/react " ;
2
2
import Table from "@mui/material/Table" ;
3
3
import TableBody from "@mui/material/TableBody" ;
4
4
import TableCell from "@mui/material/TableCell" ;
5
5
import TableContainer from "@mui/material/TableContainer" ;
6
6
import TableHead from "@mui/material/TableHead" ;
7
7
import TableRow from "@mui/material/TableRow" ;
8
- import { DeploymentValues , ExternalAuthConfig } from "api/typesGenerated" ;
8
+ import type { DeploymentValues , ExternalAuthConfig } from "api/typesGenerated" ;
9
9
import { Alert } from "components/Alert/Alert" ;
10
10
import { EnterpriseBadge } from "components/DeploySettingsLayout/Badges" ;
11
11
import { Header } from "components/DeploySettingsLayout/Header" ;
@@ -18,7 +18,7 @@ export type ExternalAuthSettingsPageViewProps = {
18
18
export const ExternalAuthSettingsPageView = ( {
19
19
config,
20
20
} : ExternalAuthSettingsPageViewProps ) : JSX . Element => {
21
- const styles = useStyles ( ) ;
21
+ const theme = useTheme ( ) ;
22
22
23
23
return (
24
24
< >
@@ -40,15 +40,32 @@ export const ExternalAuthSettingsPageView = ({
40
40
} }
41
41
/>
42
42
43
- < div className = { styles . description } >
43
+ < div
44
+ css = { {
45
+ marginTop : theme . spacing ( 3 ) ,
46
+ marginBottom : theme . spacing ( 3 ) ,
47
+ } }
48
+ >
44
49
< Alert severity = "info" actions = { < EnterpriseBadge key = "enterprise" /> } >
45
50
Integrating with multiple External authentication providers is an
46
51
Enterprise feature.
47
52
</ Alert >
48
53
</ div >
49
54
50
55
< TableContainer >
51
- < Table className = { styles . table } >
56
+ < Table
57
+ css = { css `
58
+ & td {
59
+ padding-top : ${ theme . spacing ( 3 ) } ;
60
+ padding-bottom : ${ theme . spacing ( 3 ) } ;
61
+ }
62
+
63
+ & td : last-child ,
64
+ & th : last-child {
65
+ padding-left : ${ theme . spacing ( 4 ) } ;
66
+ }
67
+ ` }
68
+ >
52
69
< TableHead >
53
70
< TableRow >
54
71
< TableCell width = "25%" > ID</ TableCell >
@@ -61,7 +78,7 @@ export const ExternalAuthSettingsPageView = ({
61
78
config . external_auth ?. length === 0 ) && (
62
79
< TableRow >
63
80
< TableCell colSpan = { 999 } >
64
- < div className = { styles . empty } >
81
+ < div css = { { textAlign : "center" } } >
65
82
No providers have been configured!
66
83
</ div >
67
84
</ TableCell >
@@ -83,23 +100,3 @@ export const ExternalAuthSettingsPageView = ({
83
100
</ >
84
101
) ;
85
102
} ;
86
-
87
- const useStyles = makeStyles ( ( theme ) => ( {
88
- table : {
89
- "& td" : {
90
- paddingTop : theme . spacing ( 3 ) ,
91
- paddingBottom : theme . spacing ( 3 ) ,
92
- } ,
93
-
94
- "& td:last-child, & th:last-child" : {
95
- paddingLeft : theme . spacing ( 4 ) ,
96
- } ,
97
- } ,
98
- description : {
99
- marginTop : theme . spacing ( 3 ) ,
100
- marginBottom : theme . spacing ( 3 ) ,
101
- } ,
102
- empty : {
103
- textAlign : "center" ,
104
- } ,
105
- } ) ) ;
0 commit comments