@@ -15,15 +15,17 @@ import ReactSVGIcon from "icons/ReactSVGIcon";
15
15
import createIdGenerator from "utils/createIdGenerator" ;
16
16
import { toTitle } from "utils/toTitle" ;
17
17
18
- import { PACKAGE_NAMES , SCSS_PACKAGES } from "./packages" ;
18
+ import { PACKAGE_NAMES , SCSS_PACKAGES , TYPESCRIPT_PACKAGES } from "./packages" ;
19
19
import {
20
20
RouteNavItem ,
21
21
NavItem ,
22
22
DividerNavItem ,
23
23
SubheaderNavItem ,
24
24
} from "./meta/types" ;
25
+ import { snakeCase } from "lodash" ;
25
26
26
27
const uuid = createIdGenerator ( "nav" ) ;
28
+ const TSDOCS_PREFIX = "/tsdocs/modules/_react_md_" ;
27
29
28
30
const getPackageRoutes = ( name : string ) : RouteNavItem [ ] => {
29
31
const routes : RouteNavItem [ ] = [ ] ;
@@ -52,6 +54,13 @@ const getPackageRoutes = (name: string): RouteNavItem[] => {
52
54
children : "Installation" ,
53
55
} ) ;
54
56
57
+ if ( name !== "material-icons" && TYPESCRIPT_PACKAGES . includes ( name ) ) {
58
+ routes . push ( {
59
+ href : `${ TSDOCS_PREFIX } ${ snakeCase ( name ) } .html` ,
60
+ children : "API (typedoc)" ,
61
+ } ) ;
62
+ }
63
+
55
64
if ( SCSS_PACKAGES . includes ( name ) ) {
56
65
routes . push ( {
57
66
href : "/sassdoc" ,
@@ -226,7 +235,7 @@ function createNavItem(
226
235
return tree ;
227
236
}
228
237
229
- if ( ! navItem . href . startsWith ( "/" ) ) {
238
+ if ( ! navItem . href . startsWith ( "/" ) || navItem . href . startsWith ( TSDOCS_PREFIX ) ) {
230
239
const itemId = navItem . href ;
231
240
tree [ itemId ] = {
232
241
...navItem ,
0 commit comments