import React, { useState } from 'react'; import styled from 'styled-components'; import { Button } from '../Button'; import { SIZES } from './styled'; import { TextInput } from './'; export default { title: 'TextInput', }; const Common = (props: Partial>) => { const [value, setValue] = useState(''); return ( {SIZES.map((size) => ( setValue(evt.target.value)} placeholder="Some placeholder…" data-testid={`input-${size}`} /> ))} ); }; export const Default = () => ; export const WithError = () => ; export const WithAll = () => ( €} right={ } /> ); const Container = styled.div` > *:not(:last-child) { margin-bottom: 1em; } `;