Skip to content

Commit d15967b

Browse files
Merge branch 'main' of https://github.com/codegouvfr/react-dsfr into main
2 parents 09dcb83 + 56c85e7 commit d15967b

File tree

4 files changed

+11
-16
lines changed

4 files changed

+11
-16
lines changed

.storybook/preview.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,15 @@ export const parameters = {
7777
};
7878

7979
const { getHardCodedWeight } = (() => {
80-
//TODO: Address this
80+
8181
const mainServices = [
82-
/*
83-
"documentation/Fundamentals/Colors",
84-
"documentation/Components/Button",
85-
"documentation/Components/Alert",
86-
*/
82+
"components",
8783
];
8884

8985
function getHardCodedWeight(kind) {
86+
9087
for (let i = 0; i < mainServices.length; i++) {
91-
if (kind.toLowerCase().includes(mainServices[i].toLowerCase())) {
88+
if (kind.toLowerCase().startsWith(mainServices[i].toLowerCase())) {
9289
return mainServices.length - i;
9390
}
9491
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@codegouvfr/react-dsfr",
3-
"version": "0.0.62",
3+
"version": "0.0.63",
44
"description": "French State Design System React integration library",
55
"repository": {
66
"type": "git",

stories/Accordion.stories.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
import React from "react";
21
import { Accordion } from "../dist/Accordion";
3-
import { sectionName } from "./sectionName";
4-
import { getStoryFactory, logCallbacks } from "./getStory";
2+
import { getStoryFactory } from "./getStory";
3+
//import { sectionName } from "./sectionName";
54

65
const { meta, getStory } = getStoryFactory({
7-
sectionName,
6+
"sectionName": "wip",
87
"wrappedComponent": { Accordion },
98
"description": `- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon)
109
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Accordion.tsx)

stories/AccordionGroup.stories.tsx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import React from "react";
21
import { AccordionGroup } from "../dist/AccordionGroup";
3-
import { sectionName } from "./sectionName";
4-
import { getStoryFactory, logCallbacks } from "./getStory";
2+
import { getStoryFactory } from "./getStory";
3+
//import { sectionName } from "./sectionName";
54

65
//TODO -> Do only one story for Accordion and AccordionGroup ?
76

87
const { meta, getStory } = getStoryFactory({
9-
sectionName,
8+
"sectionName": "wip",
109
"wrappedComponent": { AccordionGroup },
1110
"description": `- [See DSFR documentation](https://www.systeme-de-design.gouv.fr/elements-d-interface/composants/accordeon)
1211
- [See source code](https://github.com/codegouvfr/react-dsfr/blob/main/src/Accordion.tsx)

0 commit comments

Comments
 (0)