Skip to content

Commit

Permalink
Update Switch.mdx (adobe#6827)
Browse files Browse the repository at this point in the history
Add missing prop to controlled switch
  • Loading branch information
AleksandrSl committed Aug 5, 2024
1 parent 455cbf4 commit 3691c7f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-aria-components/docs/Switch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ function Example() {

return (
<>
<MySwitch onChange={setSelected}>Low power mode</MySwitch>
<MySwitch isSelected={selected} onChange={setSelected}>Low power mode</MySwitch>
<p>{selected ? 'Low' : 'High'} power mode active.</p>
</>
);
Expand Down

0 comments on commit 3691c7f

Please sign in to comment.