gatsby-theme-carbon | A Carbon inspired Gatsby theme | Frontend Framework library
kandi X-RAY | gatsby-theme-carbon Summary
kandi X-RAY | gatsby-theme-carbon Summary
The Gatsby Carbon theme includes all the configuration you need to build a beautiful site inspired by the Carbon Design System.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gatsby-theme-carbon
gatsby-theme-carbon Key Features
gatsby-theme-carbon Examples and Code Snippets
Community Discussions
Trending Discussions on gatsby-theme-carbon
QUESTION
I am using a gatsby starter gatsby-theme-carbon. It has a switcher component whose code is available here. It looks like this Switcher screenshot.
How do I disable the Switcher completely using component shadowing ? ( i.e. I don't want the Switcher at all in my website).
Thanks in advance for the help.
...ANSWER
Answered 2021-Jun-05 at 09:50As you can see in Shadowing in Gatsby themes docs:
This feature allows users to replace a file in the
src
directory that is included in the webpack bundle with their own implementation. This works for React components, pages insrc/pages
, JSON files, TypeScript files, as well as any other imported file (such as.css
) in your site.
The shadowing API uses a deterministic file structure approach to know which component should or shouldn't be rendered. In your case, you just can override the CSS props
to display it as none, or you just shadow and return an empty component, since shadowing is used to extend Gatsby themes. Create a src/gatsby-theme-blog/components/Switcher/Switcher.js
in your project and do something like:
QUESTION
I'm trying to redirect to a page using an onClick
event of a component. As I have react gatsby installation is it possible to use Link
from gatsby-link
to redirect.
ANSWER
Answered 2019-Dec-17 at 14:53 renders an anchor element (
). You would probably want to use
navigate
here instead: https://www.gatsbyjs.org/docs/gatsby-link/#how-to-use-the-navigate-helper-function.
You might also need to use the onClick prop on the component depending on how you have that setup.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gatsby-theme-carbon
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page