Skip to content

Commit

Permalink
fix inheritance api link
Browse files Browse the repository at this point in the history
  • Loading branch information
siriwatknp committed Jan 24, 2022
1 parent a8753b6 commit 42e2b75
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/pages/material/api/badge.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"spread": true,
"forwardsRefTo": "HTMLSpanElement",
"filename": "/packages/mui-material/src/Badge/Badge.js",
"inheritance": { "component": "BadgeUnstyled", "pathname": "/material/api/badge-unstyled/" },
"inheritance": { "component": "BadgeUnstyled", "pathname": "/base/api/badge-unstyled/" },
"demos": "<ul><li><a href=\"/material/react-avatar/\">Avatars</a></li>\n<li><a href=\"/material/react-badge/\">Badges</a></li></ul>",
"cssComponent": false
}
2 changes: 1 addition & 1 deletion docs/pages/material/api/slider.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
"spread": true,
"forwardsRefTo": "HTMLSpanElement",
"filename": "/packages/mui-material/src/Slider/Slider.js",
"inheritance": { "component": "SliderUnstyled", "pathname": "/material/api/slider-unstyled/" },
"inheritance": { "component": "SliderUnstyled", "pathname": "/base/api/slider-unstyled/" },
"demos": "<ul><li><a href=\"/material/react-slider/\">Slider</a></li></ul>",
"cssComponent": false
}
4 changes: 3 additions & 1 deletion docs/scripts/buildApiUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,9 @@ export const getMaterialComponentInfo = (filename: string): ComponentInfo => {
apiPathname:
inheritedComponent === 'Transition'
? 'http://reactcommunity.org/react-transition-group/transition/#Transition-props'
: `/material/api/${kebabCase(inheritedComponent)}/`,
: `/${inheritedComponent.match(/unstyled/i) ? 'base' : 'material'}/api/${kebabCase(
inheritedComponent,
)}/`,
};
},
getDemos: () => {
Expand Down

0 comments on commit 42e2b75

Please sign in to comment.