@eureca/eureca-ui
Version:
UI component library of Eureca's user and admin apps
21 lines (16 loc) • 502 B
JavaScript
import React, { useState } from 'react';
import { text, withKnobs } from '@storybook/addon-knobs';
import { Switch } from '../';
export default { title: 'Material/Switch', decorators: [withKnobs], includeStories: [] };
export function SimpleSwitch() {
const [checked, setChecked] = useState(false);
return (
<Switch
name="storybook"
label={text('Label', 'Label aqui')}
value="switch-value"
checked={checked}
onChange={() => setChecked(!checked)}
/>
);
}