From 7ae38906926dc09bc10670c361af0d2bf0050426 Mon Sep 17 00:00:00 2001 From: Hsuan Lee Date: Sat, 19 Jan 2019 18:42:04 +0800 Subject: Update dependency packages --- packages/react-docs/src/components/interface.tsx | 89 ------------------------ 1 file changed, 89 deletions(-) delete mode 100644 packages/react-docs/src/components/interface.tsx (limited to 'packages/react-docs/src/components/interface.tsx') diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx deleted file mode 100644 index 06896159f..000000000 --- a/packages/react-docs/src/components/interface.tsx +++ /dev/null @@ -1,89 +0,0 @@ -import * as _ from 'lodash'; -import * as React from 'react'; - -import { CustomType, TypeDefinitionByName } from '@0x/types'; - -import { DocsInfo } from '../docs_info'; - -import { Signature } from './signature'; -import { Type } from './type'; - -const defaultProps = {}; - -export interface InterfaceProps { - type: CustomType; - sectionName: string; - docsInfo: DocsInfo; - typeDefinitionByName: TypeDefinitionByName; - isInPopover: boolean; -} - -export const Interface: React.SFC = (props: InterfaceProps): any => { - const type = props.type; - const properties = _.map(type.children, (property, i) => { - return ( - - {property.name}:{' '} - {property.type && !_.isUndefined(property.type.method) ? ( - - ) : ( - - )} - , - - ); - }); - const hasIndexSignature = !_.isUndefined(type.indexSignature); - if (hasIndexSignature) { - const is = type.indexSignature; - const param = ( - - {is.keyName}:{' '} - - - ); - properties.push( - - [{param}]: {is.valueName}, - , - ); - } - const propertyList = _.reduce(properties, (prev: React.ReactNode, curr: React.ReactNode) => { - return [prev, '\n\t', curr]; - }); - return ( - - {`{`} -
- {'\t'} - {propertyList} -
- {`}`} -
- ); -}; - -Interface.defaultProps = defaultProps; -- cgit