� 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:
parent
f187a308bc
commit
bbb6a0754c
|
@ -150,21 +150,21 @@ const styles = StyleSheet.create({
|
||||||
borderRadius: 2,
|
borderRadius: 2,
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
text: Platform.select({
|
text: {
|
||||||
|
textAlign: 'center',
|
||||||
|
padding: 8,
|
||||||
|
...Platform.select({
|
||||||
ios: {
|
ios: {
|
||||||
// iOS blue from https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/
|
// iOS blue from https://developer.apple.com/ios/human-interface-guidelines/visual-design/color/
|
||||||
color: '#007AFF',
|
color: '#007AFF',
|
||||||
textAlign: 'center',
|
|
||||||
padding: 8,
|
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
color: 'white',
|
color: 'white',
|
||||||
textAlign: 'center',
|
|
||||||
padding: 8,
|
|
||||||
fontWeight: '500',
|
fontWeight: '500',
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
},
|
||||||
buttonDisabled: Platform.select({
|
buttonDisabled: Platform.select({
|
||||||
ios: {},
|
ios: {},
|
||||||
android: {
|
android: {
|
||||||
|
|
Loading…
Reference in New Issue