Skip to content

Commit a347805

Browse files
Adds <Accordion /> to CONTRIBUTING (#2683)
Co-authored-by: Sarah Soutoul <[email protected]>
1 parent 9c2e340 commit a347805

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

.github/media/accordion.png

49.2 KB
Loading

CONTRIBUTING.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,28 @@ To update the value, or `key`, for an SDK, see the [section on updating the key
10901090

10911091
</details>
10921092

1093+
### `<Accordion />`
1094+
1095+
The `<Accordion />` component creates a vertically stacked set of interactive headings that each reveals a section of content. It has no props and accepts `<AccordionPanel />` children.
1096+
1097+
The `<AccordionPanel />` accepts a `title` and `children`.
1098+
1099+
| Prop | Type | Comment |
1100+
| ---------- | ----------------- | --------------------------------------------------------- |
1101+
| `children` | `React.ReactNode` | The content that will be rendered in the accordion panel. |
1102+
| `title` | `string` | The title of the accordion panel. |
1103+
1104+
```mdx
1105+
<Accordion>
1106+
<AccordionPanel title="Can I use this?">It's available in v1.2.3 and above.</AccordionPanel>
1107+
<AccordionPanel title="What if I still have questions?">Send and email to [email protected].</AccordionPanel>
1108+
</Accordion>
1109+
```
1110+
1111+
The image below shows what this example looks like once rendered.
1112+
1113+
![An example of an <Accordion /> component](/.github/media/accordion.png)
1114+
10931115
### Images and static assets
10941116

10951117
Images and static assets should be placed in the `public/` folder. To reference an image or asset in content, prefix the path with `/docs`. For example, if an image exists at `public/images/logo.png`, to render it on a page you would use the following: `![Logo](/docs/images/logo.png)`.

0 commit comments

Comments
 (0)