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

Commit

Permalink
Merge pull request #538 from gluestack/fix/children-typings
Browse files Browse the repository at this point in the history
Fix/children typings
  • Loading branch information
rayan1810 authored Nov 22, 2023
2 parents ba088a2 + 188be37 commit bfe8854
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
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-alpha.0",
"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

0 comments on commit bfe8854

Please sign in to comment.