-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
fix(Button): Make the padding consistent #1505
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
fix(Button): Make the padding consistent #1505
Conversation
Codecov Report
@@ Coverage Diff @@
## next #1505 +/- ##
=======================================
Coverage 75.32% 75.32%
=======================================
Files 33 33
Lines 608 608
Branches 85 85
=======================================
Hits 458 458
Misses 129 129
Partials 21 21
Continue to review full report at Codecov.
|
xavier-villelegier
left a comment
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.
Thanks for helping us to polish these kind of things ! 👏
Actually, wouldn't it be easier to only have padding on the button style, to avoid adding multiple paddings everywhere ?
|
@xavier-villelegier achieved the same looks via this, 1c413dd. Preview: |
| textAlign: 'center', | ||
| padding: 8, | ||
| paddingTop: 2, | ||
| paddingBottom: 1, |
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.
Was just wondering why did you put padding on the title ?
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.
@xavier-villelegier it was there, with value 8 🤔
If I removed it completely:
title: {
backgroundColor: 'transparent',
color: 'white',
fontSize: 16,
textAlign: 'center',
...Platform.select({
ios: {
fontSize: 18,
},
android: {
fontFamily: 'sans-serif-medium',
},
}),
},button with only title (without icon) won't have the same height.
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.
Okay the goal is to have all button of the same height. Looks good to me then.
|
Hey @haruelrovix can you rebase your PR from the |
|
@iRoachie could you please help on If I'm not mistaken, here is what I need to do: But on step 2, Should I resolve the conflict and then continue to step 3? Here is my upstream: |
dc5180c to
cd86eb3
Compare
|
@iRoachie please ignore my previous comment. |
|
Thank youuuuu 💯 |
Continuation of #1505 which didn't account for the loading prop
* commit '0126436f5f0f37e0340b0c1da32bdea5605cb6df': (43 commits) feat(Card): Remove flexDirection prop feat(Card): Remove fontFamily prop test: Add tests for withTheme test: Fix searcbar error being logged to console fix: Hoist statics for withTheme hoc (react-native-elements#1554) fix: Use library for calculating statusBar height (react-native-elements#1553) ref: Badge component (react-native-elements#1545) Set default prop for type (react-native-elements#1546) docs: Fix paragraphs links in docs (react-native-elements#1536) docs(website): Make image preview section reusable feat: Add button types (react-native-elements#1540) fix: Rounded buttons on android now work correctly (react-native-elements#1538) ci: Run travis against node stable fix: Make button height consistent when using loading ci: Update husky and lint-staged feat: Add AntDesign to list of available icon sets (react-native-elements#1529) docs(website): Add central place to show supported icon sets (react-native-elements#1532) feat(Input): Allow label to be a React element (react-native-elements#1531) ci: Remove expo ci from PRs (react-native-elements#1528) fix(Button): Make the padding consistent (react-native-elements#1505) ...






They have the same
heightnow.Fix #1427 .