Skip to content

Commit 2d3d450

Browse files
committed
Put Accordion in WIP state
1 parent 5618056 commit 2d3d450

File tree

4 files changed

+27
-16
lines changed

4 files changed

+27
-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
}

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)

test/integration/next/yarn.lock

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
to-fast-properties "^2.0.0"
8787

8888
"@codegouvfr/react-dsfr@file:../../../dist":
89-
version "0.0.57"
89+
version "0.0.62"
9090
dependencies:
9191
tsafe "^1.4.0"
9292

@@ -374,6 +374,17 @@
374374
prop-types "^15.8.1"
375375
react-is "^18.2.0"
376376

377+
"@mui/x-data-grid@^5.17.14":
378+
version "5.17.14"
379+
resolved "https://registry.yarnpkg.com/@mui/x-data-grid/-/x-data-grid-5.17.14.tgz#3475d45ba3b18bdb343bbc954346324b2f935df0"
380+
integrity sha512-Cf3yeaEAaFzpWPoDO1YTHWL2Anz69pUnIw4Swa6UehvNwJIz3ZDoVf92xCytviugU14NmL95PjmtHqK72Jt05g==
381+
dependencies:
382+
"@babel/runtime" "^7.18.9"
383+
"@mui/utils" "^5.10.3"
384+
clsx "^1.2.1"
385+
prop-types "^15.8.1"
386+
reselect "^4.1.6"
387+
377388
"@mui/x-date-pickers@^5.0.9":
378389
version "5.0.9"
379390
resolved "https://registry.yarnpkg.com/@mui/x-date-pickers/-/x-date-pickers-5.0.9.tgz#7490ba4615285280fcb42bdd38f68578f2faa5f4"
@@ -2092,6 +2103,11 @@ require-from-string@^2.0.2:
20922103
resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909"
20932104
integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==
20942105

2106+
reselect@^4.1.6:
2107+
version "4.1.7"
2108+
resolved "https://registry.yarnpkg.com/reselect/-/reselect-4.1.7.tgz#56480d9ff3d3188970ee2b76527bd94a95567a42"
2109+
integrity sha512-Zu1xbUt3/OPwsXL46hvOOoQrap2azE7ZQbokq61BQfiXvhewsKDwhMeZjTX9sX0nvw1t/U5Audyn1I9P/m9z0A==
2110+
20952111
resolve-from@^4.0.0:
20962112
version "4.0.0"
20972113
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-4.0.0.tgz#4abcd852ad32dd7baabfe9b40e00a36db5f392e6"

0 commit comments

Comments
 (0)