diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx
index 38ec818db2..c70b99b194 100644
--- a/packages/react-docs/src/components/doc_reference.tsx
+++ b/packages/react-docs/src/components/doc_reference.tsx
@@ -1,7 +1,9 @@
import {
colors,
constants as sharedConstants,
+ Container,
EtherscanLinkSuffixes,
+ HeaderSizes,
Link,
MarkdownSection,
Networks,
@@ -101,11 +103,17 @@ export class DocReference extends React.Component
);
}
@@ -215,6 +223,13 @@ export class DocReference extends React.Component{typeDefs}
)}
+
);
}
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
index a83881b67e..dabdfff9bb 100644
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ b/packages/react-shared/src/components/anchor_title.tsx
@@ -2,6 +2,7 @@ import * as React from 'react';
import { Link as ScrollLink } from 'react-scroll';
import { HeaderSizes, Styles } from '../types';
+import { colors } from '../utils/colors';
import { constants } from '../utils/constants';
const headerSizeToScrollOffset: { [headerSize: string]: number } = {
@@ -27,7 +28,7 @@ const styles: Styles = {
cursor: 'pointer',
},
h1: {
- fontSize: '1.8em',
+ fontSize: '30px',
},
h2: {
fontSize: '1.5em',
@@ -63,7 +64,7 @@ export class AnchorTitle extends React.Component
-
+
{this.props.title}
) => void;
+ overflowX?: 'scroll' | 'hidden' | 'auto' | 'visible';
+}
+
+export const Container: React.StatelessComponent = props => {
+ const { children, className, Tag, isHidden, id, onClick, ...style } = props;
+ const visibility = isHidden ? 'hidden' : undefined;
+ return (
+
+ {children}
+
+ );
+};
+
+Container.defaultProps = {
+ Tag: 'div',
+};
+
+Container.displayName = 'Container';
diff --git a/packages/react-shared/src/components/markdown_paragraph_block.tsx b/packages/react-shared/src/components/markdown_paragraph_block.tsx
new file mode 100644
index 0000000000..5196384463
--- /dev/null
+++ b/packages/react-shared/src/components/markdown_paragraph_block.tsx
@@ -0,0 +1,14 @@
+import * as _ from 'lodash';
+import * as React from 'react';
+
+import { colors } from '../utils/colors';
+
+export interface MarkdownParagraphBlockProps {}
+
+export interface MarkdownParagraphBlockState {}
+
+export class MarkdownParagraphBlock extends React.Component {
+ public render(): React.ReactNode {
+ return {this.props.children};
+ }
+}
diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx
index e84d2b078f..3dc3efe12d 100644
--- a/packages/react-shared/src/components/markdown_section.tsx
+++ b/packages/react-shared/src/components/markdown_section.tsx
@@ -8,15 +8,18 @@ import { colors } from '../utils/colors';
import { utils } from '../utils/utils';
import { AnchorTitle } from './anchor_title';
+import { Container } from './container';
import { Link } from './link';
import { MarkdownCodeBlock } from './markdown_code_block';
import { MarkdownLinkBlock } from './markdown_link_block';
+import { MarkdownParagraphBlock } from './markdown_paragraph_block';
export interface MarkdownSectionProps {
sectionName: string;
markdownContent: string;
headerSize?: HeaderSizes;
githubLink?: string;
+ shouldReformatTitle?: boolean;
}
interface DefaultMarkdownSectionProps {
@@ -32,6 +35,7 @@ export interface MarkdownSectionState {
export class MarkdownSection extends React.Component {
public static defaultProps: Partial = {
headerSize: HeaderSizes.H3,
+ shouldReformatTitle: true,
};
constructor(props: MarkdownSectionProps) {
super(props);
@@ -43,7 +47,9 @@ export class MarkdownSection extends React.Component
-
+
-
+
@@ -71,16 +77,23 @@ export class MarkdownSection extends React.Component
)}
-
-
+
+
);
diff --git a/packages/react-shared/src/index.ts b/packages/react-shared/src/index.ts
index e33b09f191..2ab9b393e5 100644
--- a/packages/react-shared/src/index.ts
+++ b/packages/react-shared/src/index.ts
@@ -5,6 +5,7 @@ export { MarkdownSection } from './components/markdown_section';
export { NestedSidebarMenu } from './components/nested_sidebar_menu';
export { SectionHeader } from './components/section_header';
export { Link } from './components/link';
+export { Container } from './components/container';
export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, ALink } from './types';
diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts
index 596c17e838..a4dd7fefab 100644
--- a/packages/react-shared/src/utils/colors.ts
+++ b/packages/react-shared/src/utils/colors.ts
@@ -18,6 +18,7 @@ const baseColors = {
darkGrey: '#818181',
landingLinkGrey: '#919191',
linkSectionGrey: '#999999',
+ greyTheme: '#666666',
grey700: '#616161',
grey750: '#515151',
grey800: '#424242',
diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json
index 5abe0ab4e7..9fd1b04cf0 100644
--- a/packages/react-shared/tsconfig.json
+++ b/packages/react-shared/tsconfig.json
@@ -4,6 +4,7 @@
"outDir": "lib",
"rootDir": "src",
"jsx": "react",
+ "strictNullChecks": false,
"baseUrl": ".",
"paths": {
"*": ["node_modules/@types/*", "*"]