Skip to content

Commit 5c9a94b

Browse files
committed
feat: Add LayoutComponentProps utility type
1 parent c9487e6 commit 5c9a94b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

contributors.yml

+1
Original file line numberDiff line numberDiff line change
@@ -312,3 +312,4 @@
312312
- yuleicul
313313
- zeromask1337
314314
- zheng-chuang
315+
- AlemTuzlak

packages/react-router/index.ts

+1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export type {
4343
RedirectFunction,
4444
ShouldRevalidateFunction,
4545
ShouldRevalidateFunctionArgs,
46+
LayoutComponentProps,
4647
UIMatch,
4748
} from "./lib/router/utils";
4849

packages/react-router/lib/router/utils.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import type { ReactNode } from "react";
12
import type { Equal, Expect } from "../types/utils";
23
import type { Location, Path, To } from "./history";
34
import { invariant, parsePath, warning } from "./history";
@@ -192,6 +193,10 @@ export interface ShouldRevalidateFunction {
192193
(args: ShouldRevalidateFunctionArgs): boolean;
193194
}
194195

196+
export interface LayoutComponentProps {
197+
children: ReactNode
198+
}
199+
195200
export interface DataStrategyMatch
196201
extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
197202
shouldLoad: boolean;

0 commit comments

Comments
 (0)