From d136df7679b85eff054178ae8103ecd1f3b324f9 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 3 Aug 2018 13:02:14 +0200 Subject: Color-code basic type arrays orange aswell --- packages/react-docs/src/components/type.tsx | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/react-docs') diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx index ea66c7b1e..40564c0d6 100644 --- a/packages/react-docs/src/components/type.tsx +++ b/packages/react-docs/src/components/type.tsx @@ -12,6 +12,8 @@ import { Signature } from './signature'; import { constants } from '../utils/constants'; import { TypeDefinition } from './type_definition'; +const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean']; + export interface TypeProps { type: TypeDef; docsInfo: DocsInfo; @@ -73,6 +75,9 @@ export function Type(props: TypeProps): any { case TypeDocTypes.Array: typeName = type.elementType.name; + if (_.includes(basicJsTypes, typeName)) { + typeNameColor = colors.orange; + } break; case TypeDocTypes.Union: -- cgit