accordion trekkspill oversatt #2316
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request refactors the codebase to rename the "Accordion" component and related functionality to "Trekkspill" for improved clarity and consistency. The changes span multiple files, including components, styles, hooks, and type definitions.
Component and Hook Updates:
Accordion
component toTrekkspill
and updated all references, including props (accordion
→trekkspill
) and state variables (openAccordions
→openTrekkspill
). ([[1]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-cff24ff9a9a6b60d3868be7147d33f9ce634683349b0cbc99bf04e17b654947dL37-R46)
,[[2]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-cff24ff9a9a6b60d3868be7147d33f9ce634683349b0cbc99bf04e17b654947dL80-R80)
,[[3]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-a2994b5f9d302b1d5a7e4a21c23c3d4d8ed3cf74ebf194eedc94b28446d1ccebL10-R65)
,[[4]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-407f72f841add4246c84a912c6466dc316fd7e1050c945f1b84522cf2deaf346L2-R22)
,[[5]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-4e085626c9a607764a96f7225bab34b0a6879fbd53e659cf045bd9374b19248dL4-R4)
)useCheckAndOpenAccordionPanel
touseCheckAndOpenTrekkspillPanel
. ([packages/nextjs/src/store/hooks/useCheckAndOpenTrekkspillPanel.tsL4-R4](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-4e085626c9a607764a96f7225bab34b0a6879fbd53e659cf045bd9374b19248dL4-R4)
)Style Updates:
Accordion.module.scss
toTrekkspill.module.scss
and updated class names (.accordion
→.trekkspill
). ([packages/nextjs/src/components/_common/trekkspill/Trekkspill.module.scssL1-R1](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-a7f3f9f06fc00edb4e127305207d21cca59075f00cdd86293b3ea9393e80c77aL1-R1)
)Type Definitions:
PartConfigAccordion
→PartConfigTrekkspill
,PartType.Accordion
→PartType.Trekkspill
). ([[1]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-4e646302b0aa8fc5ce4b90b64759f4039dc0dadc1f8baeda118a3ef726a68005L3-R3)
,[[2]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-4e646302b0aa8fc5ce4b90b64759f4039dc0dadc1f8baeda118a3ef726a68005L68-R68)
,[[3]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-4e646302b0aa8fc5ce4b90b64759f4039dc0dadc1f8baeda118a3ef726a68005L96-R96)
)Storybook and Parts Mapper:
Accordion.stories.ts
toTrekkspill.stories.ts
and updated Storybook component references. ([packages/nextjs/src/components/_common/trekkspill/Trekkspill.stories.tsL3-R12](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-1750cf10ae82aa9fe6a4e54a8d06cc14b2d86adc5dfce7df2b8c6c9bb3207d94L3-R12)
)PartsMapper.tsx
to useTrekkspillPart
instead ofAccordionPart
. ([[1]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-e705d4bd30b7df57b6fd41e76beb8de02cc40190baf4be6f31b311dce2033016L56-R56)
,[[2]](https://github.com/navikt/nav-enonicxp-frontend/pull/2316/files#diff-e705d4bd30b7df57b6fd41e76beb8de02cc40190baf4be6f31b311dce2033016L75-R76)
)