// @flow
import * as React from 'react';
import { State, Store } from '@sambego/storybook-state';
import TextInput from './TextInput';
import notes from './TextInput.stories.md';
export const basic = () => ;
export const withDescription = () => (
);
export const withLongBreakableStrings = () => (
);
export const withLongUnbreakableStrings = () => (
);
export const error = () => (
);
export const loading = () => (
);
export const valid = () => (
);
export const requiredWithOnChange = () => {
const componentStore = new Store({
error: 'required',
value: '',
});
return (
{state => (
componentStore.set({ error: e.target.value ? '' : 'required', value: e.target.value })
}
/>
)}
);
};
export default {
title: 'Components|TextInput',
component: TextInput,
parameters: {
notes,
},
};