diff options
Diffstat (limited to 'packages')
-rw-r--r-- | packages/react-docs/CHANGELOG.md | 1 | ||||
-rw-r--r-- | packages/react-docs/src/components/type.tsx | 14 |
2 files changed, 15 insertions, 0 deletions
diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md index a90cf19f0..7f860739f 100644 --- a/packages/react-docs/CHANGELOG.md +++ b/packages/react-docs/CHANGELOG.md @@ -4,3 +4,4 @@ * Move example out into a separate sub-package * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452) + * Handle `reflection` type rendering so that anonymous function type declarations render properly diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index 56425a5df..b253f0397 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -9,6 +9,7 @@ import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '../types'; import { constants } from '../utils/constants'; import { utils } from '../utils/utils'; +import { MethodSignature } from './method_signature'; import { TypeDefinition } from './type_definition'; const typeToSection: { [typeName: string]: string } = { @@ -101,6 +102,19 @@ export function Type(props: TypeProps): any { }); break; + case TypeDocTypes.Reflection: + typeName = ( + <MethodSignature + method={type.method} + sectionName={props.sectionName} + shouldHideMethodName={true} + shouldUseArrowSyntax={true} + docsInfo={props.docsInfo} + typeDefinitionByName={props.typeDefinitionByName} + /> + ); + break; + case TypeDocTypes.TypeParameter: typeName = type.name; break; |