react-native-check-box icon indicating copy to clipboard operation
react-native-check-box copied to clipboard

Styles do not apply to touchable highlight

Open danielforsberg opened this issue 8 years ago • 0 comments

Hello.

A great simple module you've done here, good work!

One thing I noticed. Shouldn't the props for style be applied to the View in order to work?

I am trying to set a margin on the checkbox container but nothing happens.

my app:

<CheckBox
  style={{marginBottom: 5}}
  onClick={onClick} 
  rightText={rightText} />

So I looked inside the code and if I move the style prop to the View instead it works.

node_module code:

<TouchableHighlight
  onPress={()=>this.onClick()}
  underlayColor='transparent'
  disabled={this.props.disabled}
>
  <View style={[styles.container, this.props.style]}>
    {this._renderLeft()}
    {this._renderImage()}
    {this._renderRight()}
  </View>
</TouchableHighlight>

danielforsberg avatar Oct 29 '17 09:10 danielforsberg