File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed
packages/component-library/src Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ export const Root = ({ children }: Props) => (
34
34
>
35
35
< AppShell
36
36
appName = "Developer Hub"
37
+ displaySupportButton = { false }
37
38
amplitudeApiKey = { AMPLITUDE_API_KEY }
38
39
googleAnalyticsId = { GOOGLE_ANALYTICS_ID }
39
40
enableAccessibilityReporting = { ENABLE_ACCESSIBILITY_REPORTING }
Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ export const docsOptions: DocsLayoutProps = {
20
20
tree : source . pageTree ,
21
21
sidebar : {
22
22
tabs : false ,
23
+ collapsible : false ,
23
24
} ,
24
25
} ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export const AppShell = ({
62
62
63
63
type AppBodyProps = Pick <
64
64
ComponentProps < typeof Header > ,
65
- "appName" | "mainCta" | "extraCta"
65
+ "appName" | "mainCta" | "extraCta" | "displaySupportButton"
66
66
> & {
67
67
tabs ?: Tab [ ] | undefined ;
68
68
children : ReactNode ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type Props = ComponentProps<"header"> & {
30
30
| undefined ;
31
31
mainMenu ?: ReactNode | undefined ;
32
32
extraCta ?: ReactNode | undefined ;
33
+ displaySupportButton ?: boolean | undefined ;
33
34
} ;
34
35
35
36
export const Header = ( {
@@ -38,6 +39,7 @@ export const Header = ({
38
39
mainCta,
39
40
mainMenu,
40
41
extraCta,
42
+ displaySupportButton = true ,
41
43
...props
42
44
} : Props ) => (
43
45
< header className = { clsx ( styles . header , className ) } { ...props } >
@@ -53,16 +55,18 @@ export const Header = ({
53
55
{ mainMenu }
54
56
</ div >
55
57
< div className = { styles . rightMenu } >
56
- < Button
57
- variant = "ghost"
58
- size = "sm"
59
- rounded
60
- beforeIcon = { < Lifebuoy /> }
61
- drawer = { SupportDrawer }
62
- className = { styles . supportButton ?? "" }
63
- >
64
- Support
65
- </ Button >
58
+ { displaySupportButton && (
59
+ < Button
60
+ variant = "ghost"
61
+ size = "sm"
62
+ rounded
63
+ beforeIcon = { < Lifebuoy /> }
64
+ drawer = { SupportDrawer }
65
+ className = { styles . supportButton ?? "" }
66
+ >
67
+ Support
68
+ </ Button >
69
+ ) }
66
70
{ extraCta }
67
71
< MobileMenu className = { styles . mobileMenu } mainCta = { mainCta } />
68
72
< Button
You can’t perform that action at this time.
0 commit comments