Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const withOverflowScrollOnHtml = () => {
const [open, setOpen] = useState(false);
return (
<div>
<div>Scroll down</div>
<button> setOpen(true)}>Show dialog</button>
<dialog> setOpen(false)}>
<header>Dialog title</header>
</dialog>
</div>
);
};
withOverflowScrollOnHtml.story = {
export const Input = () => {
const [text, setText] = useState('foo');
return <input value="{text}"> setText(e.target.value)} />;
};
export const Checkbox = () => {
const [on, setOn] = useState(false);
return (
<label>
<input checked="{on}" type="checkbox"> setOn(e.target.checked)} />
On
</label>
);
};