Skip to content

Commit 5cc3df9

Browse files
authored
docs: update homepage snippets (#2673)
1 parent 7f634f8 commit 5cc3df9

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

docs/_snippets/accordion-jsx.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,24 @@
11
```jsx
2-
import React from "react";
3-
import "@patternfly/elements/pf-accordion/pf-accordion.js";
2+
import {
3+
Accordion,
4+
AccordionPanel,
5+
AccordionHeader,
6+
} from "@patternfly/elements/react/pf-accordion/pf-accordion.js";
47

58
export default function App() {
69
const data = [
710
{ header: "Getting Started", panel: <>Read our <a href="/get-started/">Getting started</a> page to learn how to install and use PatternFly Elements.<>},
811
{ header: "HTML APIs", panel: <>For more information on how to use each PatternFly element, read the <a href="/components/">component docs</a>.<>}
912
];
1013
return (
11-
<pf-accordion>{data.map(({ header, panel }) => (
12-
<pf-accordion-header>
14+
<Accordion>{data.map(({ header, panel }) => (
15+
<AccordionHeader>
1316
<h3>{header}</h3>
14-
</pf-accordion-header>
15-
<pf-accordion-panel>
17+
</AccordionHeader>
18+
<AccordionPanel>
1619
<p>{panel}</p>
17-
</pf-accordion-panel>))}
18-
</pf-accordion>
20+
</AccordionPanel>))}
21+
</Accordion>
1922
);
2023
}
2124
```

docs/_snippets/card-html.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
```html
2-
<script type="module" src="https://jspm.dev/@patternfly/elements/pf-card/pf-card.js"></script>
2+
<script type="module" src="https://esm.sh/@patternfly/elements/pf-card/pf-card.js"></script>
33

44
<pf-card border>
55
<h2 slot="header">Card component</h2>

0 commit comments

Comments
 (0)