insomnia/packages/insomnia-components/components/toggle-switch.stories.js

18 lines
500 B
JavaScript

import * as React from 'react';
import ToggleSwitch from './toggle-switch';
export default { title: 'Form Elements | Toggle Switch' };
const defaultOnChange = () => {};
export const Checked = () => <ToggleSwitch checked onChange={defaultOnChange} />;
export const Unchecked = () => <ToggleSwitch onChange={defaultOnChange} />;
export const Disabled = () => (
<>
<ToggleSwitch disabled checked onChange={defaultOnChange} />
<ToggleSwitch disabled onChange={defaultOnChange} />
</>
);