From 46c4767a95edbc1bf53bf872c85879bc71040c55 Mon Sep 17 00:00:00 2001 From: Suraj Date: Thu, 14 Sep 2023 18:31:43 +0530 Subject: [PATCH] fix: ancestor sx style resolution --- packages/react/package.json | 2 +- packages/react/src/styled.tsx | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/react/package.json b/packages/react/package.json index 5b54631fb..7ff1094a6 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": "0.2.45", + "version": "0.2.46", "keywords": [ "React Native", "Next.js", diff --git a/packages/react/src/styled.tsx b/packages/react/src/styled.tsx index 6863b5f9e..572bfe8f2 100644 --- a/packages/react/src/styled.tsx +++ b/packages/react/src/styled.tsx @@ -1719,7 +1719,10 @@ export function verboseStyled( // 600ms const descendantCSSIds = useMemo(() => { if (!containsDescendant) { - return {}; + return { + component: {}, + sx: {}, + }; } const ids = (() => { if ( @@ -1745,7 +1748,10 @@ export function verboseStyled( sx: sxDescendantCSSIds, }; } else { - return {}; + return { + component: {}, + sx: {}, + }; } })(); return ids;