diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 0ef9a792..d98ef13c 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,15 @@ # @gluestack-style/react +## 1.0.17 + +### Patch Changes + +### Fixes + +- Fixed children typings [PR](https://github.com/gluestack/gluestack-style/pull/538) +- Fixed react-native style typings [PR](https://github.com/gluestack/gluestack-style/pull/539) +- Fixed config warning [PR](https://github.com/gluestack/gluestack-style/pull/540) + ## 1.0.16 ### Patch Changes diff --git a/packages/react/package.json b/packages/react/package.json index 910908c9..afd0108c 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,7 +1,7 @@ { "name": "@gluestack-style/react", "description": "A universal & performant styling library for React Native, Next.js & React", - "version": "1.0.16", + "version": "1.0.17", "keywords": [ "React Native", "Next.js", diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index 2c948fb7..1f2a87ce 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -994,7 +994,6 @@ export function verboseStyled<P, Variants, ComCon>( const StyledComponent = ( { - children, //@ts-ignore orderedResolved: BUILD_TIME_ORDERED_RESOLVED = [], //@ts-ignore @@ -1009,7 +1008,6 @@ export function verboseStyled<P, Variants, ComCon>( Partial<ComponentProps<ITypeReactNativeStyles, Variants, P, ComCon>> & Partial<UtilityProps<ITypeReactNativeStyles, Variants, P>> & { as?: any; - children?: any; }, 'animationComponentGluestack' >, @@ -2019,15 +2017,11 @@ export function verboseStyled<P, Variants, ComCon>( style={resolvedStyleMemo} as={AsComp} ref={ref} - > - {children} - </ComponentWithPlugin> + /> ); } else { component = ( - <AsComp {...resolvedStyleProps} style={resolvedStyleMemo} ref={ref}> - {children} - </AsComp> + <AsComp {...resolvedStyleProps} style={resolvedStyleMemo} ref={ref} /> ); } } else { @@ -2040,18 +2034,14 @@ export function verboseStyled<P, Variants, ComCon>( states={states} style={resolvedStyleMemo} ref={ref} - > - {children} - </ComponentWithPlugin> + /> ) : ( <ComponentWithPlugin {...resolvedStyleProps} {...propsToBePassedInToPlugin} style={resolvedStyleMemo} ref={ref} - > - {children} - </ComponentWithPlugin> + /> ); } if (containsDescendant) { diff --git a/packages/react/src/types.ts b/packages/react/src/types.ts index 1f13e541..0ad2cdfe 100644 --- a/packages/react/src/types.ts +++ b/packages/react/src/types.ts @@ -963,7 +963,10 @@ export type UnionToIntersection<U> = ( export type GetRNStyles<GenericComponentStyles> = UnionToIntersection< Partial< - Exclude<GenericComponentStyles, undefined | null | false | string | number> + Exclude< + GenericComponentStyles, + undefined | null | false | string | number | any[] + > > >; diff --git a/packages/react/src/utils.ts b/packages/react/src/utils.ts index 5d91159c..ba46e1fe 100644 --- a/packages/react/src/utils.ts +++ b/packages/react/src/utils.ts @@ -360,11 +360,12 @@ export const platformSpecificSpaceUnits = (theme: Config, platform: string) => { if (newTheme.tokens) { //@ts-ignore newTheme.tokens[key] = newScale; - } else { - console.warn( - 'No tokens found in config! Please pass config in Provider to resolve styles!' - ); } + // else { + // console.warn( + // 'No tokens found in config! Please pass config in Provider to resolve styles!' + // ); + // } }); return newTheme; };