Files
link-free/src/components/Textarea/index.tsx
T
2021-12-24 11:48:37 -03:00

17 lines
388 B
TypeScript

import { TextareaWrapper, Label, Wrapper } from './styles'
import type { TextareaHTMLAttributes } from 'react'
type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & {
label?: string
}
export function Textarea({ label, ...rest }: TextareaProps) {
return (
<Wrapper>
{!!label && <Label>{label}</Label>}
<TextareaWrapper {...rest} />
</Wrapper>
)
}