Skip to content

Commit 59a1f99

Browse files
committed
Rename withAppDsfr to withDsfr
1 parent 15a0189 commit 59a1f99

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/next.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function readColorSchemeInCookie(cookie: string) {
9292
}
9393

9494
export type NextDsfrIntegrationApi = {
95-
withAppDsfr: <AppComponent extends NextComponentType<any, any, any>>(
95+
withDsfr: <AppComponent extends NextComponentType<any, any, any>>(
9696
App: AppComponent
9797
) => AppComponent;
9898
dsfrDocumentApi: {
@@ -130,7 +130,7 @@ export function createNextDsfrIntegrationApi(params: Params): NextDsfrIntegratio
130130

131131
const colorSchemeKey = "dsfrColorScheme";
132132

133-
function withAppDsfr<AppComponent extends NextComponentType<any, any, any>>(
133+
function withDsfr<AppComponent extends NextComponentType<any, any, any>>(
134134
App: AppComponent
135135
): AppComponent {
136136
function AppWithDsfr({
@@ -296,7 +296,7 @@ export function createNextDsfrIntegrationApi(params: Params): NextDsfrIntegratio
296296
}
297297

298298
return {
299-
withAppDsfr,
299+
withDsfr,
300300
"dsfrDocumentApi": {
301301
augmentDocumentByReadingColorSchemeFromCookie,
302302
getColorSchemeHtmlAttributes

test/integration/next/pages/_app.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import "@codegouvfr/react-dsfr/dsfr/dsfr.css";
44
import "@codegouvfr/react-dsfr/dsfr/utility/icons/icons.css";
55

66
const {
7-
withAppDsfr,
7+
withDsfr,
88
dsfrDocumentApi
99
} = createNextDsfrIntegrationApi({
1010
"defaultColorScheme": "system",
@@ -25,4 +25,4 @@ const {
2525

2626
export { dsfrDocumentApi };
2727

28-
export default withAppDsfr(DefaultApp);
28+
export default withDsfr(DefaultApp);

0 commit comments

Comments
 (0)