Skip to content

Commit c02d326

Browse files
committed
fix(scope): Added top level props heading
1 parent ed5a1a2 commit c02d326

File tree

3 files changed

+26
-11687
lines changed

3 files changed

+26
-11687
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"@patternfly/ast-helpers": "^1.4.0-alpha.190",
4949
"@patternfly/patternfly": "^6.0.0",
5050
"@patternfly/react-code-editor": "^6.2.2",
51-
"@patternfly/react-core": "^6.2.2",
51+
"@patternfly/react-core": "^6.0.0",
5252
"@patternfly/react-table": "^6.0.0",
5353
"@types/react": "^18.3.12",
5454
"@types/react-dom": "^18.3.1",

src/components/PropsTables.astro

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
---
22
import { PropsTable } from './PropsTable'
3+
import { Stack, StackItem } from '@patternfly/react-core'
4+
import { AutoLinkHeader } from './AutoLinkHeader'
35
46
async function getPropsData(propComponents?: string[]) {
57
if (!propComponents || propComponents.length === 0) {
@@ -25,14 +27,27 @@ const propsData = await getPropsData(propComponents)
2527
---
2628

2729
{
28-
propsData
29-
.filter((comp: any) => !!comp)
30-
.map((component: any) => (
31-
<PropsTable
32-
key={component.name}
33-
componentName={component.name}
34-
componentDescription={component.description}
35-
componentProps={component.props}
36-
/>
37-
))
30+
<Stack hasGutter>
31+
<StackItem>
32+
<AutoLinkHeader
33+
headingLevel="h2"
34+
className="pf-v6-c-content--h2"
35+
id="props-table"
36+
>
37+
Props
38+
</AutoLinkHeader>
39+
</StackItem>
40+
{propsData
41+
.filter((comp: any) => !!comp)
42+
.map((component: any) => (
43+
<StackItem>
44+
<PropsTable
45+
key={component.name}
46+
componentName={component.name}
47+
componentDescription={component.description}
48+
componentProps={component.props}
49+
/>
50+
</StackItem>
51+
))}
52+
</Stack>
3853
}

0 commit comments

Comments
 (0)