Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
feat(config): add option to enable/disable scroll to top button
Browse files Browse the repository at this point in the history
  • Loading branch information
filipowm committed Jun 4, 2020
1 parent 212ae29 commit dd2cd58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,4 @@ features:
toc:
depth: 3
previousNext: true
scrollTop: true
3 changes: 2 additions & 1 deletion src/components/layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import ToC from './tableOfContents';
import ScrollTop from './scrollTop';
import Header from './header';
import SearchSidebar from './search/sidebar';
import config from 'config';

const Wrapper = styled('div')`
display: flex;
Expand Down Expand Up @@ -39,7 +40,7 @@ const Layout = ({ children, location }) => {
<SearchSidebar show={showSearch} setShow={setShowSearch} />
<Header location={location} setShowSearch={setShowSearch} />
<MDXProvider components={mdxComponents}>
<ScrollTop />
{config.features.scrollTop === true ? <ScrollTop /> : ''}
<Wrapper>
<ContentNavigation location={location} className={'hiddenMobile'} />
<Content id="main-content">{children}</Content>
Expand Down

0 comments on commit dd2cd58

Please sign in to comment.