� Improve Button component stylesheet; removed duplicate styles (#21535)

Summary:
Updated Button component inspiration. Refactored code takes advantage of Platform Specific Code, as we want to re-use as much code as possible.

1. Import Button component
2. Button should work the same

https://github.com/facebook/react-native/pull/19752

[GENERAL] [ENHANCEMENT] [Button] - Uses spread operator for platform specific code in creating styles
Pull Request resolved: https://github.com/facebook/react-native/pull/21535

Differential Revision: D10248048

Pulled By: TheSavior

fbshipit-source-id: 7260fa56f15b70b7c9499c8da418db7b2214b0dd
This commit is contained in:
Julius Lundang 2018-10-08 23:19:24 -07:00 committed by Facebook Github Bot
parent f187a308bc
commit bbb6a0754c
1 changed files with 15 additions and 15 deletions

View File

@ -150,21 +150,21 @@ const styles = StyleSheet.create({
borderRadius: 2,
},
}),
text: Platform.select({
ios: {
// iOS blue from https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/
color: '#007AFF',
textAlign: 'center',
padding: 8,
fontSize: 18,
},
android: {
color: 'white',
textAlign: 'center',
padding: 8,
fontWeight: '500',
},
}),
text: {
textAlign: 'center',
padding: 8,
...Platform.select({
ios: {
// iOS blue from https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/
color: '#007AFF',
fontSize: 18,
},
android: {
color: 'white',
fontWeight: '500',
},
}),
},
buttonDisabled: Platform.select({
ios: {},
android: {