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

Fix/children typings #538

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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