1 | import React, { PropTypes } from 'react';
|
2 | import { View } from 'react-native';
|
3 | import styles from './style';
|
4 |
|
5 | const Line = (props) => {
|
6 | const {
|
7 | vertical,
|
8 | style,
|
9 | } = props;
|
10 | const direction = vertical ? styles.vh : styles.hr;
|
11 |
|
12 | return (
|
13 | <View style={[direction, style]} />
|
14 | );
|
15 | };
|
16 | Line.propTypes = {
|
17 | style: View.propTypes.style,
|
18 | vertical: PropTypes.bool,
|
19 | };
|
20 | Line.defaultProps = {
|
21 | style: {},
|
22 | vertical: false,
|
23 | };
|
24 | export default Line;
|