-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Add Theming #1454
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
Add Theming #1454
Conversation
Example app for the last commit (a5dce79): |
Codecov Report
@@ Coverage Diff @@
## next #1454 +/- ##
=========================================
+ Coverage 71.3% 74.79% +3.49%
=========================================
Files 30 33 +3
Lines 568 615 +47
Branches 84 88 +4
=========================================
+ Hits 405 460 +55
+ Misses 136 132 -4
+ Partials 27 23 -4
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
omg 😱That's definitely a killer feature ! We can custom so many things 😍
Also the tests are amazing 👏
...attributes | ||
} = props; | ||
|
||
if (element) return element; | ||
|
||
let childElement = ( | ||
<Text style={[styles.text, textStyle && textStyle]}>{value}</Text> | ||
<Text style={StyleSheet.flatten([styles.text, textStyle && textStyle])}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally !! 👏 We should have flattened all styles a while ago.
this is so awesome ! |
Alright! ThemeProvider now optional if you don't want theming. That's means no more breaking change! |
@iRoachie yes!! that's huge! Thanks for putting in the extra work to make that possible, I know a lot of users would appreciate that. |
Implements #216
Finally, after countless ages, theming is here 🎉!
Not just colours but:
EVERY, SINGLE, PROP
Exports three new utils:
Preview
Breaking Changes
This is a massive breaking change, all apps will need up wrap their Top level component with the<ThemeProvider />