import { withKnobs, number, boolean, text } from '@storybook/addon-knobs'; import Component from './TimePicker.Story.svelte'; export default { title: 'TimePicker', decorators: [withKnobs] }; export const Default = () => ({ Component, props: { timepicker: { pattern: text( 'Regular expression for the value (pattern in )', '(1[012]|[1-9]):[0-5][0-9](\\s)?' ), placeholder: text('Placeholder text (placeholder in )', 'hh:mm'), disabled: boolean('Disabled (disabled in )', false), light: boolean('Light variant (light in )', false), hideLabel: boolean('No label (hideLabel in )', false), labelText: text('Label text (labelText in )', 'Select a time'), invalid: boolean('Show form validation UI (invalid in )', false), invalidText: text( 'Form validation UI content (invalidText in )', 'A valid value is required' ), maxlength: number('Maximum length (maxlength in )', 5) }, select: { disabled: boolean('Disabled (disabled in )', false), hideLabel: boolean('No label (hideLabel in )', true), labelText: text('Label text (labelText in )', 'Please select'), iconDescription: text( 'Trigger icon description (iconDescription in )', 'open list of options' ) } } });