Skip to content

Commit

Permalink
take advantage of default values, format code
Browse files Browse the repository at this point in the history
  • Loading branch information
JKobrynski committed Nov 15, 2023
1 parent ab1dbf7 commit 7ffec62
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ function Checkbox(
onPress={firePressHandlerOnClick}
onMouseDown={onMouseDown}
ref={ref}
style={[StyleUtils.getCheckboxPressableStyle(containerBorderRadius ?? 0 + 2), style]} // to align outline on focus, border-radius of pressable should be 2px more than Checkbox
style={[StyleUtils.getCheckboxPressableStyle(containerBorderRadius + 2), style]} // to align outline on focus, border-radius of pressable should be 2px more than Checkbox
onKeyDown={handleSpaceKey}
role={CONST.ACCESSIBILITY_ROLE.CHECKBOX}
aria-checked={isChecked}
Expand All @@ -95,7 +95,7 @@ function Checkbox(
{children ?? (
<View
style={[
StyleUtils.getCheckboxContainerStyle(containerSize ?? 0, containerBorderRadius),
StyleUtils.getCheckboxContainerStyle(containerSize, containerBorderRadius),
containerStyle,
isChecked && styles.checkedContainer,
hasError && styles.borderColorDanger,
Expand All @@ -119,4 +119,5 @@ function Checkbox(
}

Checkbox.displayName = 'Checkbox';

export default forwardRef(Checkbox);

0 comments on commit 7ffec62

Please sign in to comment.