import * as React from 'react'
import classNames from 'classnames'
import TextArea, {
TextAreaProps
} from 'semantic-ui-react/dist/commonjs/addons/TextArea/TextArea'
import Icon from 'semantic-ui-react/dist/commonjs/elements/Icon/Icon'
import { getInputValueLength } from '../../lib/input'
import { InfoTooltip, InfoTooltipProps } from '../InfoTooltip'
import './TextAreaField.css'
export type TextAreaFieldProps = TextAreaProps & {
label?: string
maxLength?: number
error?: string
warning?: string
info?: string
tooltip?: InfoTooltipProps
}
function renderMessage(props: TextAreaFieldProps) {
const { error, warning, info } = props
if (error) {
return (
<>
{renderMessage(props)}