Skip to content

Commit cc4ce9b

Browse files
authored
Fix(switch): set default value (checked) (segmentio#932)
* fix(switch): set checked default value to false * docs(switch): replace PropsTable source
1 parent b80f6c3 commit cc4ce9b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/src/pages/components/switch.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ Use `e.target.checked` to get the latest value and update state accordingly.
5353
/>
5454
```
5555

56-
<PropsTable of="SwitchControl" />
56+
<PropsTable of="Switch" />

src/switch/src/Switch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const Switch = memo(
7171
id,
7272
name,
7373
height = 16,
74-
checked,
74+
checked = false,
7575
onChange = noop,
7676
disabled = false,
7777
appearance = 'default',

0 commit comments

Comments
 (0)