Skip to content

Commit 3691c7f

Browse files
authored
Update Switch.mdx (#6827)
Add missing prop to controlled switch
1 parent 455cbf4 commit 3691c7f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-aria-components/docs/Switch.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ function Example() {
195195

196196
return (
197197
<>
198-
<MySwitch onChange={setSelected}>Low power mode</MySwitch>
198+
<MySwitch isSelected={selected} onChange={setSelected}>Low power mode</MySwitch>
199199
<p>{selected ? 'Low' : 'High'} power mode active.</p>
200200
</>
201201
);

0 commit comments

Comments
 (0)