react-native-hecom-common
Version:
Public UI components and data structures.
31 lines (28 loc) • 682 B
JavaScript
import React from 'react';
import { View, StyleSheet } from 'react-native';
import PropTypes from 'prop-types';
/**
* 表格中的分隔线。
*/
export default class extends React.Component {
static propTypes = {
lineColor: PropTypes.string,
style: PropTypes.any,
};
static get defaultProps() {
return {
lineColor: '#e6e6e6',
};
}
render() {
const {lineColor, style} = this.props;
return (
<View
style={[{
backgroundColor: lineColor,
height: StyleSheet.hairlineWidth,
}, style]}
/>
);
}
}