From a69f600787dc7ff080f7539f4dfc4b8be3b770dc Mon Sep 17 00:00:00 2001 From: Mark Lawlor Date: Sun, 8 May 2022 22:05:28 +1000 Subject: [PATCH 1/2] fix: rendering nested child styled components --- src/{styled.ts => styled.tsx} | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) rename src/{styled.ts => styled.tsx} (81%) diff --git a/src/styled.ts b/src/styled.tsx similarity index 81% rename from src/styled.ts rename to src/styled.tsx index 0edd843..6d8dd55 100644 --- a/src/styled.ts +++ b/src/styled.tsx @@ -2,8 +2,6 @@ import { createElement, FunctionComponent, ComponentClass } from "react"; import { ImageStyle, StyleProp, TextStyle, ViewStyle } from "react-native"; import { useTailwind } from "./use-tailwind"; -const isStyled = Symbol("styled"); - type StyledProps

= P & { className?: string; tw?: string; @@ -36,25 +34,17 @@ export function styled

( }`; } - Styled[isStyled] = true; - return Styled; } type StyledComponentProps

= StyledProps

& { - component: Component

& { - [isStyled]?: boolean; - }; + component: Component

; }; export function StyledComponent

({ component, ...options }: StyledComponentProps

) { - if (component[isStyled]) { - return component; - } - - return styled

(component)(options as P); + const Component = styled

(component); + return ; } -StyledComponent[isStyled] = true; From ef628808f692d4350198052cf02820210f92dd00 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Sun, 8 May 2022 12:08:59 +0000 Subject: [PATCH 2/2] chore(release): 1.0.4 [skip ci] ## [1.0.4](https://github.com/marklawlor/tailwindcss-react-native/compare/v1.0.3...v1.0.4) (2022-05-08) ### Bug Fixes * rendering nested child styled components ([a69f600](https://github.com/marklawlor/tailwindcss-react-native/commit/a69f600787dc7ff080f7539f4dfc4b8be3b770dc)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 889d1dd..f9c75b8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.0.4](https://github.com/marklawlor/tailwindcss-react-native/compare/v1.0.3...v1.0.4) (2022-05-08) + + +### Bug Fixes + +* rendering nested child styled components ([a69f600](https://github.com/marklawlor/tailwindcss-react-native/commit/a69f600787dc7ff080f7539f4dfc4b8be3b770dc)) + ## [1.0.3](https://github.com/marklawlor/tailwindcss-react-native/compare/v1.0.2...v1.0.3) (2022-05-07)