Skip to content

Commit 0ce103d

Browse files
authored
Merge pull request #28785 from BhuvaneshPatil/27703-align-checkboxes
fix: align checkbox with input levels
2 parents 98f3b43 + 0397cfc commit 0ce103d

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/components/Checkbox.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ function Checkbox(props) {
9191
onPress={firePressHandlerOnClick}
9292
onMouseDown={props.onMouseDown}
9393
ref={props.forwardedRef}
94-
style={[props.style, StyleUtils.getCheckboxPressableStyle(props.containerBorderRadius + 2)]} // to align outline on focus, border-radius of pressable should be 2px more than Checkbox
94+
style={[StyleUtils.getCheckboxPressableStyle(props.containerBorderRadius + 2), props.style]} // to align outline on focus, border-radius of pressable should be 2px more than Checkbox
9595
onKeyDown={handleSpaceKey}
9696
accessibilityRole={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
9797
accessibilityState={{checked: props.isChecked}}

src/components/CheckboxWithLabel.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function CheckboxWithLabel(props) {
102102
isChecked={isChecked}
103103
onPress={toggleCheckbox}
104104
label={props.label}
105+
style={[styles.checkboxWithLabelCheckboxStyle]}
105106
hasError={Boolean(props.errorText)}
106107
forwardedRef={props.forwardedRef}
107108
accessibilityLabel={props.accessibilityLabel || props.label}

src/styles/styles.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3718,6 +3718,10 @@ const styles = (theme) => ({
37183718
receiptDropHeaderGap: {
37193719
backgroundColor: theme.receiptDropUIBG,
37203720
},
3721+
3722+
checkboxWithLabelCheckboxStyle: {
3723+
marginLeft: -2,
3724+
},
37213725
});
37223726

37233727
// For now we need to export the styles function that takes the theme as an argument

0 commit comments

Comments
 (0)