Skip to content
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

Remove Text from Button if title is empty #1049

Merged
merged 2 commits into from
Apr 1, 2018

Conversation

mohammad7t
Copy link
Contributor

Fixes (#639 , #771 , #901) by not adding redundant <Text/> component with styles.title.padding = 8 if title is empty.

Fixes (react-native-elements#639 , react-native-elements#771 , react-native-elements#901) by not adding redundant `<Text/>` component with `styles.title.padding = 8` if title is empty.
@codecov
Copy link

codecov bot commented Mar 30, 2018

Codecov Report

Merging #1049 into next will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             next    #1049   +/-   ##
=======================================
  Coverage   54.18%   54.18%           
=======================================
  Files          34       34           
  Lines         609      609           
  Branches      113      113           
=======================================
  Hits          330      330           
  Misses        221      221           
  Partials       58       58
Impacted Files Coverage Δ
src/buttons/Button.js 33.33% <ø> (ø) ⬆️

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 063b93f...d2832fb. Read the comment docs.

Copy link
Collaborator

@xavier-villelegier xavier-villelegier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @mhsekhavat ! 🥇

@xavier-villelegier xavier-villelegier added this to the Beta 4 Release milestone Mar 30, 2018
Without this change, `title={null}` works correctly, but `title=""` throws an exception described and resolved in following issue: facebook/react-native#13243 (comment)
This commit makes handles both `title={null}` and `title=""`.
@xavier-villelegier xavier-villelegier merged commit fa14656 into react-native-elements:next Apr 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants