Skip to content

Commit

Permalink
� Improve Button component stylesheet; removed duplicate styles (face…
Browse files Browse the repository at this point in the history
…book#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

facebook#19752

[GENERAL] [ENHANCEMENT] [Button] - Uses spread operator for platform specific code in creating styles
Pull Request resolved: facebook#21535

Differential Revision: D10248048

Pulled By: TheSavior

fbshipit-source-id: 7260fa56f15b70b7c9499c8da418db7b2214b0dd
  • Loading branch information
cHaLkdusT authored and facebook-github-bot committed Oct 9, 2018
1 parent 77c3ea9 commit 2e5e092
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions Libraries/Components/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down

0 comments on commit 2e5e092

Please sign in to comment.