11import React , { Component , PureComponent } from 'react' ;
22import { View , ListView , TouchableOpacity , StyleSheet } from 'react-native' ;
33import PropTypes from 'prop-types' ;
4- import { createStyles , maxWidth } from './media-query' ;
54import Text from './text' ;
65import ForwardIcon from '../asset/icon/forward' ;
7- import { color , font , breakWidth } from './style' ;
6+ import { color , font } from './style' ;
87
98//
109// List Content
@@ -69,30 +68,16 @@ List.propTypes = {
6968// List Item
7069//
7170
72- const itemBaseStyles = {
71+ const itemStyles = StyleSheet . create ( {
7372 item : {
7473 alignSelf : 'stretch' ,
7574 flexDirection : 'row' ,
7675 alignItems : 'center' ,
7776 height : 40 ,
78- marginTop : 1 , // prevent box-shadow blinking when pressing item
79- shadowOffset : { width : 0 , height : 0.5 } ,
80- shadowColor : color . greyBorder ,
77+ borderBottomWidth : StyleSheet . hairlineWidth ,
78+ borderBottomColor : color . greyBorder ,
8179 } ,
82- } ;
83-
84- const itemStyles = createStyles (
85- itemBaseStyles ,
86-
87- maxWidth ( breakWidth , {
88- item : {
89- marginTop : 0 ,
90- shadowOffset : { width : 0 , height : 0 } ,
91- borderBottomWidth : StyleSheet . hairlineWidth ,
92- borderBottomColor : color . greyBorder ,
93- } ,
94- } )
95- ) ;
80+ } ) ;
9681
9782export class ListItem extends PureComponent {
9883 render ( ) {
@@ -119,7 +104,6 @@ ListItem.propTypes = {
119104
120105const headStyles = StyleSheet . create ( {
121106 head : {
122- shadowOffset : { width : 0 , height : 0 } ,
123107 borderBottomWidth : 0 ,
124108 } ,
125109} ) ;
0 commit comments