File tree Expand file tree Collapse file tree 7 files changed +34
-33
lines changed
pages/ManagementSettingsPage Expand file tree Collapse file tree 7 files changed +34
-33
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ interface HeaderProps {
10
10
secondary ?: boolean ;
11
11
docsHref ?: string ;
12
12
tooltip ?: ReactNode ;
13
+ badges ?: ReactNode ;
13
14
}
14
15
15
16
export const SettingsHeader : FC < HeaderProps > = ( {
@@ -18,34 +19,38 @@ export const SettingsHeader: FC<HeaderProps> = ({
18
19
docsHref,
19
20
secondary,
20
21
tooltip,
22
+ badges,
21
23
} ) => {
22
24
const theme = useTheme ( ) ;
23
25
24
26
return (
25
27
< Stack alignItems = "baseline" direction = "row" justifyContent = "space-between" >
26
28
< div css = { { maxWidth : 420 , marginBottom : 24 } } >
27
- < Stack direction = "row" spacing = { 1.5 } alignItems = "center" >
28
- < h1
29
- css = { [
30
- {
31
- fontSize : 32 ,
32
- fontWeight : 700 ,
33
- display : "flex" ,
34
- alignItems : "baseline" ,
35
- lineHeight : "initial" ,
36
- margin : 0 ,
37
- marginBottom : 4 ,
38
- gap : 8 ,
39
- } ,
40
- secondary && {
41
- fontSize : 24 ,
42
- fontWeight : 500 ,
43
- } ,
44
- ] }
45
- >
46
- { title }
47
- </ h1 >
48
- { tooltip }
29
+ < Stack direction = "row" spacing = { 2 } alignItems = "center" >
30
+ < Stack direction = "row" spacing = { 1 } alignItems = "center" >
31
+ < h1
32
+ css = { [
33
+ {
34
+ fontSize : 32 ,
35
+ fontWeight : 700 ,
36
+ display : "flex" ,
37
+ alignItems : "baseline" ,
38
+ lineHeight : "initial" ,
39
+ margin : 0 ,
40
+ marginBottom : 4 ,
41
+ gap : 8 ,
42
+ } ,
43
+ secondary && {
44
+ fontSize : 24 ,
45
+ fontWeight : 500 ,
46
+ } ,
47
+ ] }
48
+ >
49
+ { title }
50
+ </ h1 >
51
+ { tooltip }
52
+ </ Stack >
53
+ { badges }
49
54
</ Stack >
50
55
51
56
{ description && (
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ export const CustomRolesPage: FC = () => {
67
67
< SettingsHeader
68
68
title = "Custom Roles"
69
69
description = "Manage custom roles for this organization."
70
- tooltip = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
70
+ badges = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
71
71
/>
72
72
{ permissions . assignOrgRole && isCustomRolesEnabled && (
73
73
< Button component = { RouterLink } startIcon = { < AddIcon /> } to = "create" >
Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ export const GroupsPage: FC = () => {
81
81
< SettingsHeader
82
82
title = "Groups"
83
83
description = "Manage groups for this organization."
84
- tooltip = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
84
+ badges = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
85
85
/>
86
86
{ permissions . createGroup && feats . template_rbac && (
87
87
< Button component = { RouterLink } startIcon = { < GroupAdd /> } to = "create" >
Original file line number Diff line number Diff line change @@ -73,12 +73,8 @@ export const IdpSyncPage: FC = () => {
73
73
< SettingsHeader
74
74
title = "IdP Sync"
75
75
description = "Group and role sync mappings (configured outside Coder)."
76
- tooltip = {
77
- < >
78
- < IdpSyncHelpTooltip />
79
- < FeatureBadge type = "beta" size = "lg" variant = "interactive" />
80
- </ >
81
- }
76
+ tooltip = { < IdpSyncHelpTooltip /> }
77
+ badges = { < FeatureBadge type = "beta" size = "lg" variant = "interactive" /> }
82
78
/>
83
79
< Stack direction = "row" spacing = { 2 } >
84
80
< Button
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export const OrganizationMembersPageView: FC<
63
63
< div >
64
64
< SettingsHeader
65
65
title = "Members"
66
- tooltip = { < FeatureBadge type = "beta" size = "lg" variant = "interactive" /> }
66
+ badges = { < FeatureBadge type = "beta" size = "lg" variant = "interactive" /> }
67
67
/>
68
68
69
69
< Stack >
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ export const OrganizationProvisionersPageView: FC<
32
32
>
33
33
< SettingsHeader
34
34
title = "Provisioners"
35
- tooltip = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
35
+ badges = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
36
36
/>
37
37
< Button
38
38
endIcon = { < OpenInNewIcon /> }
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ export const OrganizationSettingsPageView: FC<
69
69
< div >
70
70
< SettingsHeader
71
71
title = "Settings"
72
- tooltip = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
72
+ badges = { < FeatureBadge type = "beta" variant = "interactive" size = "lg" /> }
73
73
/>
74
74
75
75
{ Boolean ( error ) && ! isApiValidationError ( error ) && (
You can’t perform that action at this time.
0 commit comments