import React, { useState } from 'react';
import { TextInput } from '.';

export default {
  title: 'TextInput',
  component: TextInput,
};

export const Default = () => {
  const [value, setValue] = useState('');
  return (
    <TextInput
      onChange={(e) => setValue(e.target.value)}
      value={value}
    ></TextInput>
  );
};

export const Invalid = () => {
  const [value, setValue] = useState('');
  return (
    <TextInput
      onChange={(e) => setValue(e.target.value)}
      value={value}
      invalid
    ></TextInput>
  );
};
