diff options
Diffstat (limited to 'packages/react-docs/src')
-rw-r--r-- | packages/react-docs/src/components/documentation.tsx | 2 | ||||
-rw-r--r-- | packages/react-docs/src/types.ts | 1 | ||||
-rw-r--r-- | packages/react-docs/src/utils/typedoc_utils.ts | 6 |
3 files changed, 8 insertions, 1 deletions
diff --git a/packages/react-docs/src/components/documentation.tsx b/packages/react-docs/src/components/documentation.tsx index 800892dc8..0a525f702 100644 --- a/packages/react-docs/src/components/documentation.tsx +++ b/packages/react-docs/src/components/documentation.tsx @@ -91,7 +91,7 @@ export class Documentation extends React.Component<DocumentationProps, Documenta left: 0, bottom: 0, right: 0, - overflowZ: 'hidden', + overflowX: 'hidden', overflowY: 'scroll', minHeight: `calc(100vh - ${this.props.topBarHeight}px)`, WebkitOverflowScrolling: 'touch', diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts index 3b4a57ad5..f4e61edc9 100644 --- a/packages/react-docs/src/types.ts +++ b/packages/react-docs/src/types.ts @@ -94,6 +94,7 @@ export enum KindString { Method = 'Method', Interface = 'Interface', TypeAlias = 'Type alias', + ObjectLiteral = 'Object literal', Variable = 'Variable', Function = 'Function', Enumeration = 'Enumeration', diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts index 9c89b135a..0c7803a04 100644 --- a/packages/react-docs/src/utils/typedoc_utils.ts +++ b/packages/react-docs/src/utils/typedoc_utils.ts @@ -93,10 +93,16 @@ export const typeDocUtils = { throw new Error('`react-docs` only supports projects with 1 exported class per file'); } const isClassExport = packageDefinitionWithMergedChildren.children[0].kindString === KindString.Class; + const isObjectLiteralExport = + packageDefinitionWithMergedChildren.children[0].kindString === KindString.ObjectLiteral; if (isClassExport) { entities = packageDefinitionWithMergedChildren.children[0].children; const commentObj = packageDefinitionWithMergedChildren.children[0].comment; packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; + } else if (isObjectLiteralExport) { + entities = packageDefinitionWithMergedChildren.children[0].children; + const commentObj = packageDefinitionWithMergedChildren.children[0].comment; + packageComment = !_.isUndefined(commentObj) ? commentObj.shortText : packageComment; } else { entities = packageDefinitionWithMergedChildren.children; } |