aboutsummaryrefslogtreecommitdiffstats
path: root/packages/react-shared
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-11-14 03:36:48 +0800
committerGitHub <noreply@github.com>2018-11-14 03:36:48 +0800
commit5c21d3f6af2ffc513b2bbfe92abf99181a32ceca (patch)
tree0ed5f669d7412b002e804d0edd94e10a25bd82cf /packages/react-shared
parenta824264da2d8cbcd76089c5d35da95fedbadd0bb (diff)
parenta4a46dc076f4e491b30671bd9006a586ab9754bc (diff)
downloaddexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar.gz
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar.bz2
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar.lz
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar.xz
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.tar.zst
dexon-sol-tools-5c21d3f6af2ffc513b2bbfe92abf99181a32ceca.zip
Merge pull request #1244 from 0xProject/developerSectionNits
Remaining Developer Section Design Nits
Diffstat (limited to 'packages/react-shared')
-rw-r--r--packages/react-shared/src/components/anchor_title.tsx18
1 files changed, 3 insertions, 15 deletions
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
index bd99edcab..a9105e132 100644
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ b/packages/react-shared/src/components/anchor_title.tsx
@@ -1,15 +1,9 @@
import * as React from 'react';
-import { Link as ScrollLink } from 'react-scroll';
import styled from 'styled-components';
+import { Link } from '../components/link';
import { HeaderSizes, Styles } from '../types';
import { colors } from '../utils/colors';
-import { constants } from '../utils/constants';
-
-const headerSizeToScrollOffset: { [headerSize: string]: number } = {
- h2: -20,
- h3: 0,
-};
export interface AnchorTitleProps {
title: string | React.ReactNode;
@@ -73,15 +67,9 @@ export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleSt
{this.props.title}
</div>
{!this.props.isDisabled && (
- <ScrollLink
- to={this.props.id}
- hashSpy={true}
- offset={headerSizeToScrollOffset[this.props.headerSize]}
- duration={constants.DOCS_SCROLL_DURATION_MS}
- containerId={constants.SCROLL_CONTAINER_ID}
- >
+ <Link to={this.props.id}>
<AnchorIcon className="zmdi zmdi-link" shouldShowAnchor={this.props.shouldShowAnchor} />
- </ScrollLink>
+ </Link>
)}
</div>
);