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

Allow transformers to specify their style type #92

Open
arthur-fontaine opened this issue Apr 13, 2024 · 0 comments
Open

Allow transformers to specify their style type #92

arthur-fontaine opened this issue Apr 13, 2024 · 0 comments

Comments

@arthur-fontaine
Copy link
Contributor

React Native and React does not have the exact same style properties. We want a way to style in a safe way.

Let's say the type for styles in React Native is

type RNStyle = { backgroundColor: string; border: string; borderRadius: number }; // for the example, we suppose that in RN, we can only style backgroundColor, border and borderRadius

And in React

type RStyle = { border: string; borderRadius: string }

The resulting typed will intersect all the styles exported by the transformers:

type Style = { border: string }; // (backgroundColor is not in RStyle, and RN's borderRadius an R's borderRadius are incompatible
@arthur-fontaine arthur-fontaine changed the title Allow transformers to add their style type Allow transformers to specify their style type Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🔖 Ready
Development

No branches or pull requests

1 participant