Skip to content

Add Theming - #1454

Merged
iRoachie merged 78 commits into
nextfrom
theme
Oct 10, 2018
Merged

Add Theming#1454
iRoachie merged 78 commits into
nextfrom
theme

Conversation

@iRoachie

@iRoachie iRoachie commented Oct 10, 2018

Copy link
Copy Markdown
Collaborator

Implements #216

Finally, after countless ages, theming is here 🎉!

Not just colours but:

EVERY, SINGLE, PROP

Exports three new utils:

  • ThemeProvider
  • ThemeConsumer
  • withTheme

Preview

kapture 2018-10-09 at 20 57 23

Breaking Changes

This is a massive breaking change, all apps will need up wrap their Top level component with the <ThemeProvider />

@react-native-elements-ci

react-native-elements-ci commented Oct 10, 2018

Copy link
Copy Markdown
Collaborator

@codecov

codecov Bot commented Oct 10, 2018

Copy link
Copy Markdown

Codecov Report

Merging #1454 into next will increase coverage by 3.49%.
The diff coverage is 93.18%.

Impacted file tree graph

@@            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
Impacted Files Coverage Δ
src/avatar/Avatar.js 30% <ø> (ø) ⬆️
src/tooltip/Tooltip.js 91.17% <ø> (ø) ⬆️
src/tile/FeaturedTile.js 100% <ø> (ø) ⬆️
src/searchbar/SearchBar-ios.js 61.76% <ø> (ø) ⬆️
src/overlay/Overlay.js 90.9% <ø> (ø) ⬆️
src/social/SocialIcon.js 91.66% <ø> (ø) ⬆️
src/searchbar/SearchBar-android.js 66.66% <ø> (+3.03%) ⬆️
src/rating/Rating.js 80% <ø> (ø) ⬆️
src/icons/Icon.js 100% <ø> (ø) ⬆️
src/config/index.js 100% <100%> (ø)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 78f961f...a5dce79. Read the comment docs.

@Monte9 Monte9 self-assigned this Oct 10, 2018
@Monte9
Monte9 self-requested a review October 10, 2018 01:25

@xavier-villelegier xavier-villelegier left a comment

Copy link
Copy Markdown
Collaborator

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 👏

Comment thread src/badge/badge.js

let childElement = (
<Text style={[styles.text, textStyle && textStyle]}>{value}</Text>
<Text style={StyleSheet.flatten([styles.text, textStyle && textStyle])}>

Copy link
Copy Markdown
Collaborator

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.

@Gregjarvez

Copy link
Copy Markdown
Contributor

this is so awesome !

@iRoachie

Copy link
Copy Markdown
Collaborator Author

Alright! ThemeProvider now optional if you don't want theming. That's means no more breaking change!

@Monte9

Monte9 commented Oct 10, 2018

Copy link
Copy Markdown
Collaborator

@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.

@iRoachie
iRoachie merged commit e9750c8 into next Oct 10, 2018
@iRoachie
iRoachie deleted the theme branch October 10, 2018 20:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants