@patternfly/documentation-framework 1.5.3 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,25 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 1.6.0 (2023-02-07)
7
+
8
+
9
+ ### Features
10
+
11
+ * **docs:** allow propComponents from another source ([#3397](https://github.com/patternfly/patternfly-org/issues/3397)) ([017b568](https://github.com/patternfly/patternfly-org/commit/017b568ae2ff3c8aaca53566dab4fdea6f3fe492))
12
+
13
+
14
+
15
+
16
+
17
+ ## 1.5.4 (2023-02-07)
18
+
19
+ **Note:** Version bump only for package @patternfly/documentation-framework
20
+
21
+
22
+
23
+
24
+
6
25
  ## 1.5.3 (2023-02-06)
7
26
 
8
27
  **Note:** Version bump only for package @patternfly/documentation-framework
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@patternfly/documentation-framework",
3
3
  "description": "A framework to build documentation for PatternFly.",
4
- "version": "1.5.3",
4
+ "version": "1.6.0",
5
5
  "author": "Red Hat",
6
6
  "license": "MIT",
7
7
  "private": false,
@@ -84,5 +84,5 @@
84
84
  "react": "^16.8.0 || ^17.0.0",
85
85
  "react-dom": "^16.8.0 || ^17.0.0"
86
86
  },
87
- "gitHead": "a136f3771c669d04b94839b36592977b7b841f33"
87
+ "gitHead": "4ad5d447527c174b073efeaf3d5c720f9623ddc4"
88
88
  }
@@ -61,7 +61,10 @@ function toReactComponent(mdFilePath, source, buildMode) {
61
61
  }
62
62
 
63
63
  const propComponents = [...new Set(frontmatter.propComponents || [])].reduce((acc, componentName) => {
64
- const name = getTsDocName(componentName, getTsDocNameVariant(source));
64
+ // Use object properties if passed as propComponent
65
+ const component = componentName.component || componentName;
66
+ const src = componentName.source || source;
67
+ const name = getTsDocName(component, getTsDocNameVariant(src));
65
68
 
66
69
  if (tsDocs[name]) {
67
70
  acc.push(tsDocs[name]);
@@ -9,6 +9,7 @@ id: My extension
9
9
  source: react
10
10
  # If you use typescript, the name of the interface to display props for
11
11
  # These are found through the sourceProps function provdided in patternfly-docs.source.js
12
+ # Can also pass object { component: string, source: string } allowing to specify the source
12
13
  propComponents: ['Button']
13
14
  ---
14
15