Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/documentation-framework/scripts/md/parseMD.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ function toReactComponent(mdFilePath, source, buildMode) {
}

const propComponents = [...new Set(frontmatter.propComponents || [])].reduce((acc, componentName) => {
const name = getTsDocName(componentName, getTsDocNameVariant(source));
// Use object properties if passed as propComponent
const component = componentName.component || componentName;
const src = componentName.source || source;
const name = getTsDocName(component, getTsDocNameVariant(src));

if (tsDocs[name]) {
acc.push(tsDocs[name]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ id: My extension
source: react
# If you use typescript, the name of the interface to display props for
# These are found through the sourceProps function provdided in patternfly-docs.source.js
# Can also pass object { component: string, source: string } allowing to specify the source
propComponents: ['Button']
---

Expand Down