Button.js 620 B

12345678910111213141516171819202122232425
  1. import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
  2. import React from 'react'
  3. import fonts from '../../theme/fonts'
  4. const Button = ({ style, onPress, children }) => {
  5. return (
  6. <TouchableOpacity style={[styles.button,style]}onPress={onPress}>
  7. <View>
  8. {children}
  9. </View>
  10. </TouchableOpacity>
  11. )
  12. }
  13. export default Button
  14. const styles = StyleSheet.create({
  15. button:{
  16. paddingVertical: fonts.getSize(12),
  17. paddingHorizontal: fonts.getSize(12),
  18. backgroundColor: 'grey',
  19. borderRadius: fonts.getSize(4)
  20. }
  21. })