Skip to content

Commit 75fd17b

Browse files
test: remove optional false prop
1 parent a832107 commit 75fd17b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/ui/checkbox.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export type IconProps = {
3131
};
3232

3333
export const Root = ({
34-
checked = false,
34+
checked,
3535
children,
3636
onChange,
3737
disabled,
@@ -69,7 +69,7 @@ const Label = ({ text, testID, className = '' }: LabelProps) => (
6969
</Text>
7070
);
7171

72-
export const CheckboxIcon = ({ checked = false }: IconProps) => {
72+
export const CheckboxIcon = ({ checked }: IconProps) => {
7373
const color = checked ? colors.primary[300] : colors.charcoal[400];
7474
return (
7575
<MotiView
@@ -105,7 +105,7 @@ export const CheckboxIcon = ({ checked = false }: IconProps) => {
105105
);
106106
};
107107

108-
const CheckboxRoot = ({ checked = false, children, ...props }: RootProps) => (
108+
const CheckboxRoot = ({ checked, children, ...props }: RootProps) => (
109109
<Root checked={checked} accessibilityRole="checkbox" {...props}>
110110
{children}
111111
</Root>
@@ -136,7 +136,7 @@ export const Checkbox = Object.assign(CheckboxBase, {
136136
Label,
137137
});
138138

139-
export const RadioIcon = ({ checked = false }: IconProps) => {
139+
export const RadioIcon = ({ checked }: IconProps) => {
140140
const color = checked ? colors.primary[300] : colors.charcoal[400];
141141
return (
142142
<MotiView
@@ -164,7 +164,7 @@ export const RadioIcon = ({ checked = false }: IconProps) => {
164164
);
165165
};
166166

167-
const RadioRoot = ({ checked = false, children, ...props }: RootProps) => (
167+
const RadioRoot = ({ checked, children, ...props }: RootProps) => (
168168
<Root checked={checked} accessibilityRole="radio" {...props}>
169169
{children}
170170
</Root>
@@ -190,7 +190,7 @@ export const Radio = Object.assign(RadioBase, {
190190
Label,
191191
});
192192

193-
export const SwitchIcon = ({ checked = false }: IconProps) => {
193+
export const SwitchIcon = ({ checked }: IconProps) => {
194194
const translateX = checked
195195
? THUMB_OFFSET
196196
: WIDTH - THUMB_WIDTH - THUMB_OFFSET;
@@ -225,7 +225,7 @@ export const SwitchIcon = ({ checked = false }: IconProps) => {
225225
</View>
226226
);
227227
};
228-
const SwitchRoot = ({ checked = false, children, ...props }: RootProps) => (
228+
const SwitchRoot = ({ checked, children, ...props }: RootProps) => (
229229
<Root checked={checked} accessibilityRole="switch" {...props}>
230230
{children}
231231
</Root>

0 commit comments

Comments
 (0)