1- import React , { ChangeEventHandler , ElementType , forwardRef , HTMLAttributes } from 'react'
1+ import React , { ChangeEventHandler , forwardRef , HTMLAttributes } from 'react'
22import PropTypes from 'prop-types'
33import classNames from 'classnames'
44
@@ -40,17 +40,15 @@ export interface CFormTextareaProps extends HTMLAttributes<HTMLTextAreaElement>
4040}
4141
4242export const CFormTextarea = forwardRef < HTMLTextAreaElement , CFormTextareaProps > (
43- ( { children, className, customClassName, invalid, plainText, valid, ...rest } , ref ) => {
44- const _className = customClassName
45- ? customClassName
46- : classNames (
47- plainText ? 'form-control-plaintext' : 'form-control' ,
48- {
49- 'is-invalid' : invalid ,
50- 'is-valid' : valid ,
51- } ,
52- className ,
53- )
43+ ( { children, className, invalid, plainText, valid, ...rest } , ref ) => {
44+ const _className = classNames (
45+ plainText ? 'form-control-plaintext' : 'form-control' ,
46+ {
47+ 'is-invalid' : invalid ,
48+ 'is-valid' : valid ,
49+ } ,
50+ className ,
51+ )
5452 return (
5553 < textarea className = { _className } { ...rest } ref = { ref } >
5654 { children }
@@ -62,7 +60,6 @@ export const CFormTextarea = forwardRef<HTMLTextAreaElement, CFormTextareaProps>
6260CFormTextarea . propTypes = {
6361 children : PropTypes . node ,
6462 className : PropTypes . string ,
65- customClassName : PropTypes . string ,
6663 invalid : PropTypes . bool ,
6764 plainText : PropTypes . bool ,
6865 valid : PropTypes . bool ,
0 commit comments