lion/packages/input-range/stories/index.stories.js
Thomas Allmer 4a93599228 chore: update storybook version
Co-authored-by: Joren Broekema <Joren.Broekema@ing.com>
2020-01-13 13:58:03 +01:00

110 lines
2 KiB
JavaScript

import { css } from '@lion/core';
import { html, storiesOf } from '@open-wc/demoing-storybook';
import '../lion-input-range.js';
const rangeDemoStyle = css`
.demo-range {
max-width: 400px;
}
`;
storiesOf('Forms | Input Range')
.add(
'Default',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
min="200"
max="500"
label="Input range"
></lion-input-range>
`,
)
.add(
'Help text',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
min="200"
max="500"
.modelValue="${300}"
label="Input range"
help-text="A help text can show additional hints"
></lion-input-range>
`,
)
.add(
'Units',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
min="0"
max="100"
.modelValue="${50}"
unit="%"
label="Percentage"
></lion-input-range>
`,
)
.add(
'With steps',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
min="200"
max="500"
step="50"
.modelValue="${300}"
label="Input range"
help-text="This slider uses increments of 50"
></lion-input-range>
`,
)
.add(
'No min max labels',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
label="Input range"
min="0"
max="100"
no-min-max-labels
></lion-input-range>
`,
)
.add(
'Disabled',
() => html`
<style>
${rangeDemoStyle}
</style>
<lion-input-range
class="demo-range"
min="200"
max="500"
.modelValue="${300}"
disabled
label="Input range"
></lion-input-range>
`,
);