import React, { PureComponent } from 'react'; import { StyleSheet, TouchableOpacity, Image, ImageBackground, StyleProp, ViewStyle, } from 'react-native'; class SocketProps { socketWrapperStyle: StyleProp; socketBackgroundImageSize: { [key: string]: number } = { width: 240, height: 240 }; socketImageSize: { [key: string]: number } = { width: 140, height: 140 }; socketImageTintColor: string; socketBackgroundImage: string; socketImage: string; onPress: () => void; } export default class SocketView extends PureComponent { static defaultProps = new SocketProps(); formatImageSource = source => (typeof source === 'string' ? { uri: source } : source); handleSocketPress = () => { const { onPress } = this.props; onPress && onPress(); }; render() { const { socketWrapperStyle, socketBackgroundImage, socketImage, socketImageSize, socketImageTintColor, socketBackgroundImageSize, } = this.props; return ( ); } } const styles = StyleSheet.create({ container: { alignItems: 'center', justifyContent: 'center', }, });