RightButton.js 762 B

123456789101112131415161718192021222324252627282930
  1. import React,{Component} from 'react';
  2. import {View,Image,TouchableOpacity} from 'react-native';
  3. import Device from '../tool/Device'
  4. class BackButton extends Component{
  5. constructor(props){
  6. super(props)
  7. }
  8. render(){
  9. const {Icon,Click} =this.props
  10. return (
  11. <TouchableOpacity onPress={
  12. ()=>{
  13. Click()
  14. }
  15. }>
  16. <View style={{paddingRight:Device.scale(11),paddingLeft:Device.scale(11)}}>
  17. <Image source={Icon} style={[{height:Device.scale(20),width:Device.scale(17.5)},this.props.style]}></Image>
  18. </View>
  19. </TouchableOpacity>
  20. )
  21. }
  22. }
  23. export default BackButton;