import { Validator } from '@lion/validate';
import { html, storiesOf } from '@open-wc/demoing-storybook';
import '../lion-switch-button.js';
import '../lion-switch.js';
storiesOf('Buttons|Switch')
.add(
'Default',
() => html`
`,
)
.add(
'Disabeld',
() => html`
`,
)
.add('Validation', () => {
class IsTrue extends Validator {
constructor(...args) {
super(...args);
this.name = 'IsTrue';
}
execute(value) {
return !value.checked;
}
static async getMessage() {
return "You won't get the latest news!";
}
}
return html`
`;
})
.add(
'Button',
() => html`
`,
);