manifold/web/components/expanding-input.tsx
Sinclair Chen 8d06e4b4d2
refactor text input into one component (#1016)
* Add responsive text input component

* Add styled expanding textarea component
2022-10-09 19:37:24 -07:00

17 lines
427 B
TypeScript

import clsx from 'clsx'
import Textarea from 'react-expanding-textarea'
/** Expanding `<textarea>` with same style as input.tsx */
export const ExpandingInput = (props: Parameters<typeof Textarea>[0]) => {
const { className, ...rest } = props
return (
<Textarea
className={clsx(
'textarea textarea-bordered resize-none text-[16px] md:text-[14px]',
className
)}
{...rest}
/>
)
}