File tree Expand file tree Collapse file tree 1 file changed +25
-2
lines changed
adev/shared-docs/pipeline/api-gen/rendering/templates Expand file tree Collapse file tree 1 file changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -10,18 +10,41 @@ import {Fragment, h} from 'preact';
1010import { DocEntryRenderable } from '../entities/renderables' ;
1111import { normalizeTabUrl } from '../transforms/url-transforms' ;
1212import { RawHtml } from './raw-html' ;
13+ import { CodeSymbol } from './code-symbols' ;
1314
1415const DESCRIPTION_TAB_NAME = 'Description' ;
1516
1617/** Component to render the description tab. */
1718export function TabDescription ( props : { entry : DocEntryRenderable } ) {
18- if ( ! props . entry . htmlDescription || props . entry . htmlDescription === props . entry . shortHtmlDescription ) {
19- return ( < > </ > ) ;
19+ const exportedBy = props . entry . jsdocTags . filter ( ( t ) => t . name === 'ngModule' ) ;
20+ if (
21+ ( ! props . entry . htmlDescription ||
22+ props . entry . htmlDescription === props . entry . shortHtmlDescription ) &&
23+ ! exportedBy . length
24+ ) {
25+ return < > </ > ;
2026 }
2127
2228 return (
2329 < div data-tab = { DESCRIPTION_TAB_NAME } data-tab-url = { normalizeTabUrl ( DESCRIPTION_TAB_NAME ) } >
2430 < RawHtml value = { props . entry . htmlDescription } />
31+
32+ { exportedBy . length ? (
33+ < >
34+ < hr />
35+ < h2 > Exported by</ h2 >
36+
37+ < ul >
38+ { exportedBy . map ( ( tag ) => (
39+ < li >
40+ < CodeSymbol code = { tag . comment } />
41+ </ li >
42+ ) ) }
43+ </ ul >
44+ </ >
45+ ) : (
46+ < > </ >
47+ ) }
2548 </ div >
2649 ) ;
2750}
You can’t perform that action at this time.
0 commit comments