[React Native] Build a Separator UI component

In this lesson we'll create a reusable React Native separator component which manages it's own styles.

 

 
import React from 'react';
import {View, StyleSheet} from 'react-native';

var styles = StyleSheet.create({
    divdir: {
        height: 1,
        backgroundColor: '#E4E4E4',
        flex: 1,
        marginLeft: 15
    },
});

class Divdir extends React.Component{
    render(){
        return (
            <View style={styles.divdir} />
        );
    }
};

module.exports = Divdir;

posted @ 2016-07-28 03:00  Zhentiw  阅读(232)  评论(0编辑  收藏  举报