UNPKG

@eureca/eureca-ui

Version:

UI component library of Eureca's user and admin apps

29 lines (22 loc) 681 B
import React, { useState } from 'react'; import { withKnobs, text, boolean } from '@storybook/addon-knobs'; import { NakedInput as Naked } from '../'; export default { title: 'Material/Inputs', decorators: [withKnobs], includeStories: [] }; export function NakedInputStory() { const [value, setValue] = useState(''); const helperText = text('Helper text', 'Optional helper text'); const disabled = boolean('Disabled'); function handleChange(e) { setValue(e.target.value); } return ( <Naked name="naked-input" label="Naked" value={value} onChange={handleChange} helperText={helperText} disabled={disabled} /> ); }