Commit 9caf991
Fixes button partially showing when parent view height is 0 (facebook#26435)
Summary:
When the parent view that wraps a button has height 0, the button is still shown partially because of the padding given for text inside Button component for iOS. Here is the issue raised for that:
facebook#26421
Probably, we should not hard code these values, rather provide a way to provide custom style ? This is my first PR so not making big change. :D
## Changelog
[iOS] [Fixed] - Give margin instead of padding to text in Button component
Pull Request resolved: facebook#26435
Test Plan:
When using this block of code,
```
<View style={{height:0}}>
<Button title="There is an issue"></Button>
</View>
```
Before:
<img width="284" alt="image" src="https://user-images.githubusercontent.com/5866078/64905271-6c129700-d6f5-11e9-86c1-c301eb8123f3.png">
After:
<img width="283" alt="image" src="https://user-images.githubusercontent.com/5866078/64905284-8cdaec80-d6f5-11e9-9589-28d8d01c8ba1.png">
Differential Revision: D17661181
Pulled By: cpojer
fbshipit-source-id: 62b04123d9edb4d760bd54d96ae0615c1ccff7ab1 parent 4b93500 commit 9caf991
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
208 | 208 | | |
209 | 209 | | |
210 | 210 | | |
| |||
0 commit comments