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 #407 from gluestack/fix/broken-lucide-icon
Browse files Browse the repository at this point in the history
Fix/broken lucide icon
  • Loading branch information
ankit-tailor authored Sep 8, 2023
2 parents 805c6dd + ccd82ce commit b89d21b
Show file tree
Hide file tree
Showing 2 changed files with 18 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": "0.2.37",
"version": "0.2.38",
"keywords": [
"React Native",
"Next.js",
Expand Down
31 changes: 17 additions & 14 deletions packages/react/src/styled.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -975,7 +975,7 @@ export function verboseStyled<P, Variants, ComCon>(

const ancestorStyleContext = useContext(AncestorStyleContext);
let incomingComponentProps = {};
let remainingComponentProps = {};
let applyComponentInlineProps = {};
let sxBaseStyleFlatternStyleObject = {};
let sxVariantFlatternStyleObject = {};
let sxCompoundVariantFlatternStyleObject = {};
Expand Down Expand Up @@ -1183,7 +1183,7 @@ export function verboseStyled<P, Variants, ComCon>(

// passingProps is specific to current component

let applyComponentInlineProps: any = componentPropsWithoutVariants;
// let applyComponentInlineProps: any = componentPropsWithoutVariants;

// const STABLEHASH_states = stableHash(states);
// 520ms
Expand All @@ -1195,8 +1195,8 @@ export function verboseStyled<P, Variants, ComCon>(
Object.keys(componentExtendedConfig).length > 0
) {
componentStyleConfig.resolveProps.forEach((toBeResovledProp: any) => {
if (applyComponentInlineProps[toBeResovledProp]) {
let value = applyComponentInlineProps[toBeResovledProp];
if (componentPropsWithoutVariants[toBeResovledProp]) {
let value = componentPropsWithoutVariants[toBeResovledProp];
if (
CONFIG.propertyResolver &&
CONFIG.propertyResolver.props &&
Expand All @@ -1222,12 +1222,12 @@ export function verboseStyled<P, Variants, ComCon>(
resolvedInlineProps[toBeResovledProp] =
getResolvedTokenValueFromConfig(
componentExtendedConfig,
applyComponentInlineProps,
componentPropsWithoutVariants,
toBeResovledProp,
applyComponentInlineProps[toBeResovledProp]
componentPropsWithoutVariants[toBeResovledProp]
);
}
delete applyComponentInlineProps[toBeResovledProp];
delete componentPropsWithoutVariants[toBeResovledProp];
}
});
}
Expand All @@ -1254,8 +1254,9 @@ export function verboseStyled<P, Variants, ComCon>(
);

let containsSX = false;
Object.assign(remainingComponentProps, filteredPassingRemainingProps);
Object.assign(remainingComponentProps, filteredComponentRemainingProps);
Object.assign(applyComponentInlineProps, filteredPassingRemainingProps);
Object.assign(applyComponentInlineProps, filteredComponentRemainingProps);

if (
Object.keys(filteredComponentSx).length > 0 ||
Object.keys(filteredPassingSx).length > 0
Expand Down Expand Up @@ -1541,14 +1542,15 @@ export function verboseStyled<P, Variants, ComCon>(
injectAndUpdateSXProps(filteredPassingSx);

Object.assign(
remainingComponentProps,
applyComponentInlineProps,
filteredPassingRemainingPropsUpdated
);
Object.assign(remainingComponentProps, filteredComponentRemainingProps);
applyComponentInlineProps = remainingComponentProps;
}

//// refactor end ....
Object.assign(
applyComponentInlineProps,
filteredComponentRemainingProps
);
}
}

if (containsDescendant) {
Expand Down Expand Up @@ -1747,6 +1749,7 @@ export function verboseStyled<P, Variants, ComCon>(
...applySxStateBaseStyleCSSIds.current,
];
Object.assign(resolvedInlineProps, applyComponentInlineProps);

const resolvedStyleProps = generateStylePropsFromCSSIds(
resolvedInlineProps,
styleCSSIds,
Expand Down

0 comments on commit b89d21b

Please sign in to comment.