Skip to content

Commit 43be051

Browse files
committed
fix(generator): partial defaultProps
1 parent eb392e6 commit 43be051

File tree

7 files changed

+11
-6
lines changed

7 files changed

+11
-6
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@pandacss/generator': patch
3+
---
4+
5+
Fix TypeScript types for `defaultProps` in `withProvider` and `withContext` to be partial

packages/generator/src/artifacts/preact-jsx/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface RecipeFn {
4141
4242
export interface JsxFactoryOptions<TProps extends Dict> {
4343
dataAttr?: boolean
44-
defaultProps?: TProps
44+
defaultProps?: Partial<TProps>
4545
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
4646
forwardProps?: string[]
4747
}

packages/generator/src/artifacts/qwik-jsx/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ interface RecipeFn {
4444
4545
export interface JsxFactoryOptions<TProps extends Dict> {
4646
dataAttr?: boolean
47-
defaultProps?: TProps
47+
defaultProps?: Partial<TProps>
4848
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
4949
forwardProps?: string[]
5050
}

packages/generator/src/artifacts/react-jsx/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ interface RecipeFn {
4343
4444
interface JsxFactoryOptions<TProps extends Dict> {
4545
dataAttr?: boolean
46-
defaultProps?: TProps
46+
defaultProps?: Partial<TProps>
4747
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
4848
forwardProps?: string[]
4949
}

packages/generator/src/artifacts/solid-jsx/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ interface RecipeFn {
4141
4242
export interface JsxFactoryOptions<TProps extends Dict> {
4343
dataAttr?: boolean
44-
defaultProps?: TProps
44+
defaultProps?: Partial<TProps>
4545
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
4646
forwardProps?: string[]
4747
}

packages/generator/src/artifacts/vue-jsx/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ interface RecipeFn {
5050
5151
export interface JsxFactoryOptions<TProps extends Dict> {
5252
dataAttr?: boolean
53-
defaultProps?: TProps
53+
defaultProps?: Partial<TProps>
5454
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
5555
forwardProps?: string[]
5656
}

packages/studio/styled-system/types/jsx.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ interface RecipeFn {
2929

3030
interface JsxFactoryOptions<TProps extends Dict> {
3131
dataAttr?: boolean
32-
defaultProps?: TProps
32+
defaultProps?: Partial<TProps>
3333
shouldForwardProp?: (prop: string, variantKeys: string[]) => boolean
3434
forwardProps?: string[]
3535
}

0 commit comments

Comments
 (0)