diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-10-03 07:13:16 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-10-03 07:13:16 +0800 |
commit | 343b922ec11a6108caaf3095e59be0e56d45ee4a (patch) | |
tree | ad38a124853c4cd153f5a290a0dc461447f8c799 /packages/react-docs/src/components/documentation.tsx | |
parent | 6deb027bdf4e57f8918fd2413f0fdc55311508d3 (diff) | |
parent | f1ecb8c5cb28a0a7ca6f7ad2ff11194091df62a4 (diff) | |
download | dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar.gz dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar.bz2 dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar.lz dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar.xz dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.tar.zst dexon-sol-tools-343b922ec11a6108caaf3095e59be0e56d45ee4a.zip |
Merge branch 'development' into feature/asset-buyer/improve-asset-buyer-manager
* development: (178 commits)
Change cache key back to repo from repo-built
Change the lint command back
Merge build & install
Remove deps cache all together
Cache all nested node_modules directories
Explicitly specify yarn cache folder
Ignore linter issues
Fix linter issue
Separate deps and built caches
Build tslint rules before running linter
Cache yarn cache directory without node modules
Run linter before prettier as it fails more often
Add yarn cache path
Split CI install and build steps
Move bundle-size out of static tests and don't wait for a build with static tests
Introduce a build:ci command that doesn't build webpack bundles
Measure only one bundle size as they're the same
Fix linter errors
Fix no_website CI builds
Check bundle size on CI
...
Diffstat (limited to 'packages/react-docs/src/components/documentation.tsx')
-rw-r--r-- | packages/react-docs/src/components/documentation.tsx | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 9d9b5141a..a23111297 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -9,24 +9,23 @@ import { Styles, utils as sharedUtils, } from '@0xproject/react-shared'; -import * as _ from 'lodash'; -import CircularProgress from 'material-ui/CircularProgress'; -import * as React from 'react'; -import * as semver from 'semver'; - -import { DocsInfo } from '../docs_info'; import { - AddressByContractName, DocAgnosticFormat, Event, ExternalExportToLink, Property, SolidityMethod, - SupportedDocJson, TypeDefinitionByName, TypescriptFunction, TypescriptMethod, -} from '../types'; +} from '@0xproject/types'; +import * as _ from 'lodash'; +import CircularProgress from 'material-ui/CircularProgress'; +import * as React from 'react'; +import * as semver from 'semver'; + +import { DocsInfo } from '../docs_info'; +import { AddressByContractName, SupportedDocJson } from '../types'; import { constants } from '../utils/constants'; import { Badge } from './badge'; @@ -219,11 +218,11 @@ export class Documentation extends React.Component<DocumentationProps, Documenta _.isEmpty(docSection.events); const sortedTypes = _.sortBy(docSection.types, 'name'); - const typeDefs = _.map(sortedTypes, customType => { + const typeDefs = _.map(sortedTypes, (customType, i) => { return ( <TypeDefinition sectionName={sectionName} - key={`type-${customType.name}`} + key={`type-${customType.name}-${i}`} customType={customType} docsInfo={this.props.docsInfo} typeDefinitionByName={typeDefinitionByName} @@ -330,7 +329,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta return <div>{externalExports}</div>; } private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode { - if (this.props.docsInfo.type !== SupportedDocJson.Doxity) { + if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) { return null; } @@ -354,7 +353,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta key={`badge-${networkName}-${sectionName}`} href={linkIfExists} target="_blank" - style={{ color: colors.white, textDecoration: 'none' }} + style={{ color: colors.white, textDecoration: 'none', marginTop: 8 }} > <Badge title={networkName} backgroundColor={networkNameToColor[networkName]} /> </a> |