File tree Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Expand file tree Collapse file tree 4 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " @codegouvfr/react-dsfr" ,
3- "version" : " 1.13.4-rc.0 " ,
3+ "version" : " 1.13.4" ,
44 "description" : " French State Design System React integration library" ,
55 "repository" : {
66 "type" : " git" ,
Original file line number Diff line number Diff line change @@ -366,6 +366,7 @@ export const Header = memo(
366366 < div
367367 className = { fr . cx ( "fr-header__search" , "fr-modal" ) }
368368 id = { searchModalId }
369+ aria-labelledby = { `${ id } -search-bar-button` }
369370 >
370371 < div
371372 className = { fr . cx (
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ import { useRerenderOnChange } from "../tools/StatefulObservable/hooks";
99import { createConsentBannerAndConsentManagement } from "./ConsentBannerAndConsentManagement" ;
1010import { isBrowser } from "../tools/isBrowser" ;
1111
12- export const localStorageKeyPrefix = "@codegouvfr/react-dsfr finalityConsent" ;
12+ export const defaultLocalStorageKeyPrefix = "@codegouvfr/react-dsfr finalityConsent" ;
1313
1414export function createConsentManagement <
1515 FinalityDescription extends Record <
@@ -21,10 +21,16 @@ export function createConsentManagement<
2121 consentCallback ?: ConsentCallback < ExtractFinalityFromFinalityDescription < FinalityDescription > > ;
2222 /** Optional: If you have a dedicated page that provides comprehensive information about your website's GDPR policies. */
2323 personalDataPolicyLinkProps ?: RegisteredLinkProps ;
24+ localStorageKeyPrefix ?: string ;
2425} ) {
2526 type Finality = ExtractFinalityFromFinalityDescription < FinalityDescription > ;
2627
27- const { finalityDescription, personalDataPolicyLinkProps, consentCallback } = params ;
28+ const {
29+ finalityDescription,
30+ personalDataPolicyLinkProps,
31+ consentCallback,
32+ localStorageKeyPrefix = defaultLocalStorageKeyPrefix
33+ } = params ;
2834
2935 const finalities = getFinalitiesFromFinalityDescription ( {
3036 "finalityDescription" :
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import React from "react";
22import { sectionName } from "./sectionName" ;
33import { getStoryFactory } from "./getStory" ;
44import { createConsentManagement } from "../dist/consentManagement" ;
5- import { localStorageKeyPrefix } from "../dist/consentManagement/createConsentManagement" ;
5+ import { defaultLocalStorageKeyPrefix } from "../dist/consentManagement/createConsentManagement" ;
66import { Placeholder } from "../dist/consentManagement/Placeholder" ;
77import { Footer } from "../dist/Footer" ;
88import { Button } from "../dist/Button" ;
@@ -284,7 +284,7 @@ function Story() {
284284 < Button
285285 onClick = { ( ) => {
286286 Object . keys ( localStorage )
287- . filter ( key => key . startsWith ( localStorageKeyPrefix ) )
287+ . filter ( key => key . startsWith ( defaultLocalStorageKeyPrefix ) )
288288 . forEach ( key => localStorage . removeItem ( key ) ) ;
289289
290290 location . reload ( ) ;
You can’t perform that action at this time.
0 commit comments