huix9527
7/26/2016 - 4:12 AM

tomato.js

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}