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) => (
3434 >
3535 < AppShell
3636 appName = "Developer Hub"
37+ displaySupportButton = { false }
3738 amplitudeApiKey = { AMPLITUDE_API_KEY }
3839 googleAnalyticsId = { GOOGLE_ANALYTICS_ID }
3940 enableAccessibilityReporting = { ENABLE_ACCESSIBILITY_REPORTING }
Original file line number Diff line number Diff line change @@ -20,5 +20,6 @@ export const docsOptions: DocsLayoutProps = {
2020 tree : source . pageTree ,
2121 sidebar : {
2222 tabs : false ,
23+ collapsible : false ,
2324 } ,
2425} ;
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ export const AppShell = ({
6262
6363type AppBodyProps = Pick <
6464 ComponentProps < typeof Header > ,
65- "appName" | "mainCta" | "extraCta"
65+ "appName" | "mainCta" | "extraCta" | "displaySupportButton"
6666> & {
6767 tabs ?: Tab [ ] | undefined ;
6868 children : ReactNode ;
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ type Props = ComponentProps<"header"> & {
3030 | undefined ;
3131 mainMenu ?: ReactNode | undefined ;
3232 extraCta ?: ReactNode | undefined ;
33+ displaySupportButton ?: boolean | undefined ;
3334} ;
3435
3536export const Header = ( {
@@ -38,6 +39,7 @@ export const Header = ({
3839 mainCta,
3940 mainMenu,
4041 extraCta,
42+ displaySupportButton = true ,
4143 ...props
4244} : Props ) => (
4345 < header className = { clsx ( styles . header , className ) } { ...props } >
@@ -53,16 +55,18 @@ export const Header = ({
5355 { mainMenu }
5456 </ div >
5557 < 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+ ) }
6670 { extraCta }
6771 < MobileMenu className = { styles . mobileMenu } mainCta = { mainCta } />
6872 < Button
You can’t perform that action at this time.
0 commit comments