Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Release/@gluestack style/[email protected] #541

Merged
merged 13 commits into from
Nov 23, 2023
10 changes: 10 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
18 changes: 4 additions & 14 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -994,7 +994,6 @@ export function verboseStyled<P, Variants, ComCon>(

const StyledComponent = (
{
children,
//@ts-ignore
orderedResolved: BUILD_TIME_ORDERED_RESOLVED = [],
//@ts-ignore
Expand All @@ -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'
>,
Expand Down Expand Up @@ -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 {
Expand All @@ -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) {
Expand Down
5 changes: 4 additions & 1 deletion packages/react/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
>
>
>;

Expand Down
9 changes: 5 additions & 4 deletions packages/react/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
Expand Down