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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
302 B
TypeScript
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<boolean>(false);
return (
<Switch
checked={checked}
onChange={(event) => setChecked(event.target.checked)}
/>
);
}