Tengo un componente de reacción que se ve así:
import { TextareaHTMLAttributes} from 'react' import styled from 'styled-components' const TextAreaElement = styled.textarea` border-radius: 40px; border: none; background: white; ` const TextArea = (props: TextareaHTMLAttributes<any>) => { <--- replace <any> here return <TextAreaElement {...props} /> }Sé que puedo hacer algo como esto, pero preferiría no tener que agregar cada accesorio manualmente:
const TextArea = ({placeholder} : {placeholder: string}) => { return <TextAreaElement placeholder={placeholder} /> }Puede pasar los accesorios como un elemento HTML normal
import React from "react"; const CustomTA = (props: React.HTMLProps<HTMLTextAreaElement>) => { return <textarea {...props} />; };