ListItemDivider.js 611 B

123456789101112131415161718192021222324252627
  1. import React, {Component} from 'react';
  2. import Global from '../utils/Global';
  3. import {
  4. View,
  5. PixelRatio,
  6. Dimensions,
  7. } from 'react-native';
  8. const {width} = Dimensions.get('window');
  9. export default class ListItemDivider extends Component {
  10. render() {
  11. var height = 1 / PixelRatio.get();
  12. return (
  13. <View style={{width: width, height: height, backgroundColor: '#FFFFFF'}}>
  14. <View style={{
  15. width: width - 20,
  16. height: height,
  17. marginLeft: 10,
  18. marginRight: 10,
  19. backgroundColor: Global.dividerColor
  20. }}/>
  21. </View>
  22. );
  23. }
  24. }