File tree Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Expand file tree Collapse file tree 2 files changed +4
-6
lines changed Original file line number Diff line number Diff line change 2121 "**/*.js" : true
2222 },
2323 "editor.codeActionsOnSave" : {
24- "source.fixAll.eslint" : true
24+ "source.fixAll.eslint" : " explicit "
2525 },
2626 "editor.formatOnSave" : true ,
2727 "[typescriptreact]" : {
Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ const filterRestyleProps = <
1212 componentProps : TProps ,
1313 omitPropertiesMap : { [ key in keyof TProps ] : boolean } ,
1414) => {
15- const cleanProps : TProps = { } as TProps ;
15+ const cleanProps : TProps & { variant ?: unknown } = { } as TProps ;
1616 const restyleProps : TProps & { variant ?: unknown } = { } as TProps ;
1717 let serializedRestyleProps = '' ;
18+
1819 if ( omitPropertiesMap . variant ) {
1920 restyleProps . variant = componentProps . variant ?? 'defaults' ;
21+ cleanProps . variant = restyleProps . variant ;
2022 }
2123 for ( const key in componentProps ) {
2224 if ( omitPropertiesMap [ key as keyof TProps ] ) {
@@ -26,7 +28,6 @@ const filterRestyleProps = <
2628 cleanProps [ key ] = componentProps [ key ] ;
2729 }
2830 }
29-
3031 const keys = { cleanProps, restyleProps, serializedRestyleProps} ;
3132 return keys ;
3233} ;
@@ -93,9 +94,6 @@ const useRestyle = <
9394 ] ) ;
9495
9596 cleanProps . style = calculatedStyle ;
96- if ( restyleProps . variant ) {
97- ( cleanProps as TProps & { variant ?: unknown } ) . variant = restyleProps . variant ;
98- }
9997 return cleanProps ;
10098} ;
10199
You can’t perform that action at this time.
0 commit comments