import { h , VNode } from 'preact' ; import { TextInput } from './textInput.component' ; import { withA11y } from '@storybook/addon-a11y' ; export default { title : 'TextInput' , decorators : [ withA11y ] , } ; export const defaultView = ( ) : VNode => ( < TextInput onInput = { ( ) => { } } />); export const hasValue = ( ) : VNode => ( < TextInput value = "Hello there!" onInput = { ( ) => { } } />); export const hasPlaceholder = ( ) : VNode => ( < TextInput placeholder = "e.g. Tomato" onInput = { ( ) => { } } />); export const hasError = ( ) : VNode => ( < TextInput hasError onInput = { ( ) => { } } />); export const typePassword = ( ) : VNode => ( < TextInput type = "password" onInput = { ( ) => { } } />);