This repository has been archived by the owner on May 16, 2022. It is now read-only.
Releases: z0al/react-native-styled.macro
Releases · z0al/react-native-styled.macro
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.3
v0.8.2
v0.8.1
v0.8.0
v0.7.1
v0.7.0
0.7.0 (2020-11-22)
Features
-
support static expressions as arguments (79ab202)
We are now using
babel-helper-evaluate-path
(the same package used by plugins likebabel-plugin-minify-constant-folding
) to statically
evaluate the first argument passed tostyled
. That means it's now possible to write something like this:const bgWhite = 'bg-white' const style = [bgWhite, 'text-black'] styled(style)
Template literals and other simple expressions also work.
Please note that object properties still don't work e.g.
const styles = { text: ['text-base'] } styled(styles.text) // will throw an error