Skip to content

Commit 8b27cf9

Browse files
ethansharlidord-wix
authored andcommitted
pass containerStyle to checkbox when there's no label
1 parent 575e252 commit 8b27cf9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/checkbox/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ class Checkbox extends Component<CheckboxPropTypes, CheckboxState> {
172172
}
173173

174174
renderCheckbox() {
175-
const {selectedIcon, color, iconColor, disabled, testID, style, containerStyle, ...others} = this.props;
175+
const {selectedIcon, color, iconColor, label, disabled, testID, style, containerStyle, ...others} = this.props;
176176

177177
return (
178178
//@ts-ignore
@@ -181,7 +181,7 @@ class Checkbox extends Component<CheckboxPropTypes, CheckboxState> {
181181
activeOpacity={1}
182182
testID={testID}
183183
{...others}
184-
style={[this.getBorderStyle(), style]}
184+
style={[this.getBorderStyle(), style, !label && containerStyle]}
185185
onPress={this.onPress}
186186
>
187187
{

0 commit comments

Comments
 (0)