Skip to content

Commit eee67f7

Browse files
authored
Merge pull request #267 from m-maillot/doc/update-accordion
doc(accordion): add missing titleAs props to the documentation
2 parents 1526340 + 74a5863 commit eee67f7

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

stories/Accordion.stories.tsx

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,23 @@ import { sectionName } from "./sectionName";
55
const { meta, getStory } = getStoryFactory({
66
sectionName,
77
"wrappedComponent": { Accordion },
8+
argTypes: {
9+
"label": {
10+
"control": { "type": "text" }
11+
},
12+
"titleAs": {
13+
"description": "Define the heading level of the accordion label",
14+
"options": (() => {
15+
return ["h1", "h2", "h3", "h4", "h5", "h6", undefined] as const;
16+
})()
17+
},
18+
"children": {
19+
"control": { "type": "text" }
20+
},
21+
"defaultExpanded": {
22+
"control": { "type": "boolean" }
23+
}
24+
},
825
"description": `- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon)
926
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Accordion.tsx)
1027
@@ -47,6 +64,7 @@ export default meta;
4764

4865
export const Default = getStory({
4966
"label": "Name of the Accordion",
67+
"titleAs": undefined,
5068
"children": "Content of the Accordion",
5169
"defaultExpanded": false,
5270
...logCallbacks(["onExpandedChange"])

0 commit comments

Comments
 (0)