tomato.js
import React, { Component } from 'react';
import {
View,
} from 'react-native';
class Tomato extends Component {
setNativeProps(props) {
this.refs['tomato-view'].setNativeProps(props);
}
render() {
let {style, children, ...rest} = this.props;
let tomato_style = {backgroundColor: 'tomato', borderColor: 'rgba(0, 0, 0, 0.6)', borderWidth: 1};
return (
<View {...rest} style={[tomato_style, style]} ref={'tomato-view'}>
{children}
</View>
);
}
}
export {Tomato}