diff options
author | Fabio Berger <me@fabioberger.com> | 2018-03-05 20:53:13 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-03-05 20:53:13 +0800 |
commit | 5a90fece8020f9be5c0f52f6ccf65dacb824b1cd (patch) | |
tree | 3597cbdbdf0fe1ef1ffadf164ce372db09812529 /packages/website/ts/pages/documentation | |
parent | 874e6678491d25aa7db300d68bdcb73863685c62 (diff) | |
download | dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.gz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.bz2 dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.lz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.xz dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.tar.zst dexon-sol-tools-5a90fece8020f9be5c0f52f6ccf65dacb824b1cd.zip |
Moved over all pages/shared components and dependencies to react-shared
Diffstat (limited to 'packages/website/ts/pages/documentation')
9 files changed, 22 insertions, 22 deletions
diff --git a/packages/website/ts/pages/documentation/comment.tsx b/packages/website/ts/pages/documentation/comment.tsx index 5f177e97e..b8902679a 100644 --- a/packages/website/ts/pages/documentation/comment.tsx +++ b/packages/website/ts/pages/documentation/comment.tsx @@ -1,7 +1,7 @@ +import { MarkdownCodeBlock } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import * as ReactMarkdown from 'react-markdown'; -import { MarkdownCodeBlock } from 'ts/pages/shared/markdown_code_block'; interface CommentProps { comment: string; diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx index 2c8f1c103..b3b58c0c8 100644 --- a/packages/website/ts/pages/documentation/doc_page.tsx +++ b/packages/website/ts/pages/documentation/doc_page.tsx @@ -1,3 +1,4 @@ +import { MenuSubsectionsBySection } from '@0xproject/react-shared'; import findVersions = require('find-versions'); import * as _ from 'lodash'; import * as React from 'react'; @@ -7,7 +8,7 @@ import { TopBar } from 'ts/components/top_bar/top_bar'; import { DocsInfo } from 'ts/pages/documentation/docs_info'; import { Documentation } from 'ts/pages/documentation/documentation'; import { Dispatcher } from 'ts/redux/dispatcher'; -import { DocAgnosticFormat, DocPackages, DoxityDocObj, Environments, MenuSubsectionsBySection } from 'ts/types'; +import { DocAgnosticFormat, DocPackages, DoxityDocObj, Environments } from 'ts/types'; import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { docUtils } from 'ts/utils/doc_utils'; diff --git a/packages/website/ts/pages/documentation/docs_info.ts b/packages/website/ts/pages/documentation/docs_info.ts index 31e151fe8..09fb7a2bc 100644 --- a/packages/website/ts/pages/documentation/docs_info.ts +++ b/packages/website/ts/pages/documentation/docs_info.ts @@ -1,3 +1,4 @@ +import { MenuSubsectionsBySection } from '@0xproject/react-shared'; import compareVersions = require('compare-versions'); import * as _ from 'lodash'; import { @@ -6,7 +7,6 @@ import { DocsInfoConfig, DocsMenu, DoxityDocObj, - MenuSubsectionsBySection, SectionsMap, SupportedDocJson, TypeDocNode, diff --git a/packages/website/ts/pages/documentation/documentation.tsx b/packages/website/ts/pages/documentation/documentation.tsx index 88331d1a7..3229bbd93 100644 --- a/packages/website/ts/pages/documentation/documentation.tsx +++ b/packages/website/ts/pages/documentation/documentation.tsx @@ -1,4 +1,13 @@ -import { Styles } from '@0xproject/react-shared'; +import { + colors, + constants as sharedConstants, + MarkdownSection, + MenuSubsectionsBySection, + NestedSidebarMenu, + SectionHeader, + Styles, + utils as sharedUtils, +} from '@0xproject/react-shared'; import * as _ from 'lodash'; import CircularProgress from 'material-ui/CircularProgress'; import * as React from 'react'; @@ -11,16 +20,12 @@ import { MethodBlock } from 'ts/pages/documentation/method_block'; import { SourceLink } from 'ts/pages/documentation/source_link'; import { Type } from 'ts/pages/documentation/type'; import { TypeDefinition } from 'ts/pages/documentation/type_definition'; -import { MarkdownSection } from 'ts/pages/shared/markdown_section'; -import { NestedSidebarMenu } from 'ts/pages/shared/nested_sidebar_menu'; -import { SectionHeader } from 'ts/pages/shared/section_header'; import { AddressByContractName, DocAgnosticFormat, DoxityDocObj, EtherscanLinkSuffixes, Event, - MenuSubsectionsBySection, Networks, Property, SolidityMethod, @@ -28,8 +33,6 @@ import { TypeDefinitionByName, TypescriptMethod, } from 'ts/types'; -import { colors } from 'ts/utils/colors'; -import { configs } from 'ts/utils/configs'; import { constants } from 'ts/utils/constants'; import { utils } from 'ts/utils/utils'; @@ -77,7 +80,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta public componentDidUpdate(prevProps: DocumentationProps, prevState: DocumentationState) { if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) { const hash = this.props.location.hash.slice(1); - utils.scrollToHash(hash, configs.SCROLL_CONTAINER_ID); + sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID); } } public render() { @@ -117,11 +120,11 @@ export class Documentation extends React.Component<DocumentationProps, Documenta style={{ backgroundColor: colors.white }} > <div - id={configs.SCROLL_CONTAINER_ID} + id={sharedConstants.SCROLL_CONTAINER_ID} style={styles.mainContainers} className="absolute px1" > - <div id={configs.SCROLL_TOP_ID} /> + <div id={sharedConstants.SCROLL_TOP_ID} /> {this._renderDocumentation()} </div> </div> diff --git a/packages/website/ts/pages/documentation/event_definition.tsx b/packages/website/ts/pages/documentation/event_definition.tsx index aead27d78..06d8a3d79 100644 --- a/packages/website/ts/pages/documentation/event_definition.tsx +++ b/packages/website/ts/pages/documentation/event_definition.tsx @@ -1,10 +1,9 @@ -import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared'; +import { AnchorTitle, colors, HeaderSizes } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { DocsInfo } from 'ts/pages/documentation/docs_info'; import { Type } from 'ts/pages/documentation/type'; import { Event, EventArg } from 'ts/types'; -import { colors } from 'ts/utils/colors'; interface EventDefinitionProps { event: Event; diff --git a/packages/website/ts/pages/documentation/method_block.tsx b/packages/website/ts/pages/documentation/method_block.tsx index a1f0b38ab..a52ab55c3 100644 --- a/packages/website/ts/pages/documentation/method_block.tsx +++ b/packages/website/ts/pages/documentation/method_block.tsx @@ -1,4 +1,4 @@ -import { AnchorTitle, HeaderSizes, Styles } from '@0xproject/react-shared'; +import { AnchorTitle, colors, HeaderSizes, Styles } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Comment } from 'ts/pages/documentation/comment'; @@ -6,7 +6,6 @@ import { DocsInfo } from 'ts/pages/documentation/docs_info'; import { MethodSignature } from 'ts/pages/documentation/method_signature'; import { SourceLink } from 'ts/pages/documentation/source_link'; import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptMethod } from 'ts/types'; -import { colors } from 'ts/utils/colors'; import { typeDocUtils } from 'ts/utils/typedoc_utils'; interface MethodBlockProps { diff --git a/packages/website/ts/pages/documentation/source_link.tsx b/packages/website/ts/pages/documentation/source_link.tsx index 31f80aba3..d39ad14c4 100644 --- a/packages/website/ts/pages/documentation/source_link.tsx +++ b/packages/website/ts/pages/documentation/source_link.tsx @@ -1,7 +1,7 @@ +import { colors } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Source } from 'ts/types'; -import { colors } from 'ts/utils/colors'; interface SourceLinkProps { source: Source; diff --git a/packages/website/ts/pages/documentation/type.tsx b/packages/website/ts/pages/documentation/type.tsx index 2fec4c95f..2c90a0567 100644 --- a/packages/website/ts/pages/documentation/type.tsx +++ b/packages/website/ts/pages/documentation/type.tsx @@ -1,4 +1,4 @@ -import { constants as sharedConstants, utils as sharedUtils } from '@0xproject/react-shared'; +import { colors, constants as sharedConstants, utils as sharedUtils } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Link as ScrollLink } from 'react-scroll'; @@ -6,7 +6,6 @@ import * as ReactTooltip from 'react-tooltip'; import { DocsInfo } from 'ts/pages/documentation/docs_info'; import { TypeDefinition } from 'ts/pages/documentation/type_definition'; import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from 'ts/types'; -import { colors } from 'ts/utils/colors'; import { constants } from 'ts/utils/constants'; import { utils } from 'ts/utils/utils'; diff --git a/packages/website/ts/pages/documentation/type_definition.tsx b/packages/website/ts/pages/documentation/type_definition.tsx index dd83d120d..60f307c68 100644 --- a/packages/website/ts/pages/documentation/type_definition.tsx +++ b/packages/website/ts/pages/documentation/type_definition.tsx @@ -1,4 +1,4 @@ -import { AnchorTitle, HeaderSizes } from '@0xproject/react-shared'; +import { AnchorTitle, colors, HeaderSizes } from '@0xproject/react-shared'; import * as _ from 'lodash'; import * as React from 'react'; import { Comment } from 'ts/pages/documentation/comment'; @@ -9,7 +9,6 @@ import { Interface } from 'ts/pages/documentation/interface'; import { MethodSignature } from 'ts/pages/documentation/method_signature'; import { Type } from 'ts/pages/documentation/type'; import { CustomType, CustomTypeChild, KindString, TypeDocTypes } from 'ts/types'; -import { colors } from 'ts/utils/colors'; import { utils } from 'ts/utils/utils'; interface TypeDefinitionProps { |