rn-try-n-buy-abfrl
Version:
Virtual try-on plugin for ABFRL
41 lines (38 loc) • 1.1 kB
JavaScript
import React from 'react';
import { Image, TouchableOpacity } from 'react-native';
const ImageButton =(props) =>{
return (
<TouchableOpacity
disabled={props._disabled ? props._disabled : false}
style={{
height: props.height,
width: props.width,
justifyContent: 'center',
alignItems: 'center',
marginLeft: props.marginLeft,
marginRight: props.marginRight,
marginTop: props.marginTop,
marginBottom: props.marginBottom,
backgroundColor: props.backgroundColor,
padding: props.padding,
zIndex: props.zIndex || 3,
borderColor:props.borderColor,
borderWidth:props.borderWidth,
borderRadius:props.borderRadius
}}
onPress={props.onPress}
>
<Image
style={{
width:props.imgWidth || props.width,
height: props.imgHeight || props.height,
resizeMode:'contain',
tintColor: props.tintColor || props.tintColor
}}
source = {props.imagepath}
>
</Image>
</TouchableOpacity>
);
}
export default ImageButton;