apollographql / gatsby-theme-apollo

💜 Themes that we use to build Gatsby sites at Apollo
MIT License
371 stars 103 forks source link

How to customize Header link? #166

Closed kingRayhan closed 2 years ago

kingRayhan commented 3 years ago

I want to customize this Launch Graph Manager link. I didn't find any component on gatsby-theme-apollo-core to override.

image

Here is my repo for reproduction: https://github.com/kingRayhan/sapience-bangla

InfoExpDesign commented 3 years ago

I had the same question and found the answer in https://github.com/apollographql/gatsby-theme-apollo/issues/99

basically, use component shadowing and change the export in the header-button.js, quoted below:

The maintainer also helped me remove the "Launch Graph Manager" header as I wasn't using it.

src/gatsby-theme-apollo-docs/components/header-button.js

export default () => null;

jgarrow commented 2 years ago

Closing this due to inactivity. But InfoExpDesign is correct, you would use shadowing to override the theme's default component and replace it with your own. You can find 2 examples of component shadowing in the example directory in this repo, one of which is removing the "Launch Graph Manager" button like in the above comment.