@@ -49,17 +49,24 @@ export const SettingsHeader: React.FC<{
49
49
title : string
50
50
description : string | JSX . Element
51
51
isEnterprise ?: boolean
52
+ isEnabled ?: boolean
52
53
docsHref : string
53
- } > = ( { title, description, isEnterprise, docsHref } ) => {
54
+ } > = ( { title, description, isEnterprise, docsHref, isEnabled } ) => {
54
55
const styles = useStyles ( )
55
56
56
57
return (
57
58
< Stack alignItems = "baseline" direction = "row" justifyContent = "space-between" >
58
59
< div className = { styles . headingGroup } >
59
- < h1 className = { styles . title } >
60
- { title }
60
+ < Stack direction = "row" alignItems = "center" className = { styles . badges } spacing = { 1 } >
61
+ { isEnabled ? (
62
+ < span className = { styles . enabledBadge } > Enabled</ span >
63
+ ) : (
64
+ < span className = { styles . disabledBadge } > Enabled</ span >
65
+ ) }
61
66
{ isEnterprise ? < span className = { styles . enterpriseBadge } > Enterprise</ span > : null }
62
- </ h1 >
67
+ </ Stack >
68
+
69
+ < h1 className = { styles . title } > { title } </ h1 >
63
70
< span className = { styles . description } > { description } </ span >
64
71
</ div >
65
72
@@ -229,7 +236,7 @@ const useStyles = makeStyles((theme) => ({
229
236
230
237
headingGroup : {
231
238
marginBottom : theme . spacing ( 3 ) ,
232
- maxWidth : 550 ,
239
+ maxWidth : 420 ,
233
240
} ,
234
241
235
242
title : {
@@ -239,7 +246,7 @@ const useStyles = makeStyles((theme) => ({
239
246
alignItems : "center" ,
240
247
lineHeight : "initial" ,
241
248
margin : 0 ,
242
- marginBottom : theme . spacing ( 2 ) ,
249
+ marginBottom : theme . spacing ( 1 ) ,
243
250
} ,
244
251
245
252
description : {
@@ -248,19 +255,46 @@ const useStyles = makeStyles((theme) => ({
248
255
lineHeight : "160%" ,
249
256
} ,
250
257
258
+ badges : {
259
+ marginBottom : theme . spacing ( 2 ) ,
260
+ } ,
261
+
251
262
enterpriseBadge : {
252
263
fontSize : 10 ,
253
264
fontWeight : 600 ,
254
265
textTransform : "uppercase" ,
255
266
letterSpacing : "0.085em" ,
256
- marginLeft : theme . spacing ( 2 ) ,
267
+ backgroundColor : theme . palette . info . dark ,
268
+ padding : theme . spacing ( 0.5 , 2 ) ,
269
+ borderRadius : 9999 ,
270
+ border : `1px solid ${ theme . palette . info . light } ` ,
271
+ lineHeight : "160%" ,
272
+ } ,
273
+
274
+ enabledBadge : {
275
+ fontSize : 10 ,
276
+ fontWeight : 600 ,
277
+ textTransform : "uppercase" ,
278
+ letterSpacing : "0.085em" ,
257
279
backgroundColor : theme . palette . success . dark ,
258
280
padding : theme . spacing ( 0.5 , 2 ) ,
259
281
borderRadius : 9999 ,
260
282
border : `1px solid ${ theme . palette . success . light } ` ,
261
283
lineHeight : "160%" ,
262
284
} ,
263
285
286
+ disabledBadge : {
287
+ fontSize : 10 ,
288
+ fontWeight : 600 ,
289
+ textTransform : "uppercase" ,
290
+ letterSpacing : "0.085em" ,
291
+ backgroundColor : theme . palette . background . paper ,
292
+ padding : theme . spacing ( 0.5 , 2 ) ,
293
+ borderRadius : 9999 ,
294
+ border : `1px solid ${ theme . palette . divider } ` ,
295
+ lineHeight : "160%" ,
296
+ } ,
297
+
264
298
settingsList : {
265
299
background : theme . palette . background . paper ,
266
300
borderRadius : theme . shape . borderRadius ,
0 commit comments