kristerkari / babel-plugin-react-native-stylename-to-style Goto Github PK
View Code? Open in Web Editor NEWTransform styleName property to style property in react-native.
License: MIT License
Transform styleName property to style property in react-native.
License: MIT License
Thanks for build the amazing tools for us.
As you know, we can use kristerkari/react-native-types-for-css-modules
to support className
in react native. to avoid error in my typescript react-native project.
But I can not use styleName
in typescript react-native project.
Anonymous imports don't work when you have more than one css file to import, even when the other import is a named import. It is very common to have a global css file in addition to the currentFile.css file so certain styles can be reused anywhere in the app.
// Doesn't work
import styles from '../../app.scss';
import './welcome.scss';
// Doesn't work
import '../../app.scss';
import styles from './welcome.scss';
// Doesn't work
import '../../app.scss';
import './welcome.scss';
// Works
import globalStyles from '../../app.scss';
import localStyles from './welcome.scss';
Is there a way to combine the transformed json objects and overriding based on the order of import: Use "write new property if doesn't exist, overwrite otherwise" strategy when combining?
Is it a deal breaker? Yes.
Because that would allow us to write like,
styleName={[globalStyles.container, localStyles.welcomeContainer]} // before
styleName="container welcome-container" // after
styleName={[globalStyles.button, localStyles.button]} // before
styleName="button" // after
Linked to #29 in the parent sass-transformer repo.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.