APSL / react-native-item-cell

React Native default iOS item cell
MIT License
72 stars 15 forks source link

Component type support for 'icon' prop and bugfix and update Readme #21

Open ngxiaoyi opened 7 years ago

ngxiaoyi commented 7 years ago
  1. Support component/react element type of 'icon' prop. #20 Now we can use react-native-vector-icons or other image component like this:

    <ItemCell
    icon={<Icon name="ios-person" size={30} color="#4F8EF7" />}
    >
    text here
    </ItemCell>
  2. Remove children proptype check. "this.props.children" is a special prop of React: https://facebook.github.io/react/docs/jsx-in-depth.html#children-in-jsx , the children prop here won't work and will leads to an warning.

  3. update the doc

Tested on my local env, maybe need furthermore tests.

alvaromb commented 7 years ago

Hey! Looks great @ngxiaoyi!

Thanks.

alvaromb commented 7 years ago

Looks good, will merge today.

Thanks.