import { useState } from 'react'; import { PixelTextarea } from './PixelTextarea'; export function Default() { return ( ); } export function Uncontrolled() { return ( ); } export function Controlled() { const [value, setValue] = useState(''); return ( setValue(e.target.value)} placeholder="Type to see live updates..." hint={`${value.length} chars`} /> ); } export function Tones() { return (
); } export function Surfaces() { return (
); } export function WithError() { return ( ); } export function Disabled() { return ( ); } export function Autosize() { const [value, setValue] = useState( 'Type more lines to watch this grow.\nIt will expand between minRows and maxRows.', ); return ( setValue(e.target.value)} /> ); } export function WithCharCount() { const [value, setValue] = useState('Short blurb'); return ( setValue(e.target.value)} showCount={{ max: 140 }} placeholder="Up to 140 characters" /> ); } export function Required() { return ( ); }