Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding optional "children" property to the TailwindProvider interface, to avoid TypeScript error. #197

Open
Brownbus opened this issue Jul 12, 2023 · 4 comments

Comments

@Brownbus
Copy link

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch tailwind-rn@4.2.0 for the project I'm working on.

If used with TypeScript, TailwindProvider causes a ts error: (Typescript error: Property 'children' does not exist on type 'IntrinsicAttributes & Props').

Here is the diff that solved my problem:

diff --git a/node_modules/tailwind-rn/dist/tailwind-provider.d.ts b/node_modules/tailwind-rn/dist/tailwind-provider.d.ts
index afa56a7..40864af 100644
--- a/node_modules/tailwind-rn/dist/tailwind-provider.d.ts
+++ b/node_modules/tailwind-rn/dist/tailwind-provider.d.ts
@@ -4,6 +4,7 @@ import { Utilities } from './types';
 interface Props {
     utilities: Utilities;
     colorScheme?: ColorSchemeName;
+    children?: React.ReactNode | React.ReactNode[]
 }
 declare const TailwindProvider: React.FC<Props>;
 export default TailwindProvider;

This issue body was partially generated by patch-package.

@HubertRyanOfficial
Copy link

This need to release urgente, like right now!

@HubertRyanOfficial
Copy link

why hasn't this been implemented yet?

@BrunoMPedraza
Copy link

Amazing, thanks

@zaini
Copy link

zaini commented Oct 5, 2024

@vadimdemedes can we have this fix included?

Edit: ended up using NativeWind, cleaner API too imo: https://www.nativewind.dev/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants