Files
react-test/docs/data/joy/components/switch/SwitchControlled.js

13 lines
293 B
JavaScript
Raw Normal View History

2025-12-12 14:26:25 +09:00
import * as React from 'react';
import Switch from '@mui/joy/Switch';
export default function SwitchControlled() {
const [checked, setChecked] = React.useState(false);
return (
<Switch
checked={checked}
onChange={(event) => setChecked(event.target.checked)}
/>
);
}