import { storiesOf, html } from '@open-wc/demoing-storybook'; import { css } from '@lion/core'; import { Required } from '@lion/validate'; import '@lion/form/lion-form.js'; import '@lion/option/lion-option.js'; import '@lion/button/lion-button.js'; import '../lion-select-rich.js'; import '../lion-options.js'; const selectRichDemoStyle = css` .demo-area { margin: 50px; } `; storiesOf('Forms|Select Rich', module) .add( 'Default', () => html`
Red Hotpink Teal
`, ) .add( 'Options with HTML', () => html`

I am red

and multi Line

I am hotpink

and multi Line

I am teal

and multi Line

`, ) .add( 'Many Options with scrolling', () => html`

I am red

I am hotpink

I am teal

I am green

I am blue

`, ) .add( 'Read-only prefilled', () => html`
Red Hotpink Teal
`, ) .add( 'Disabled', () => html`
Red Hotpink Teal Red Blue Hotpink Green Teal
`, ) .add( 'Validation', () => html`
select a color Red Hotpink Teal
`, ) .add('Render Options', () => { const objs = [ { type: 'mastercard', label: 'Master Card', amount: 12000, active: true }, { type: 'visacard', label: 'Visa Card', amount: 0, active: false }, ]; function showOutput() { // eslint-disable-next-line no-undef output.innerHTML = JSON.stringify(this.checkedValue, null, 2); } return html`
${objs.map( obj => html` ${obj.label} `, )}

          
`; }) .add( 'Interaction mode', () => html`

By default the select-rich uses the same interaction-mode as the operating system.

Red Hotpink Teal Red Hotpink Teal
`, );