import * as React from 'react'; import {isEmpty} from 'lodash'; import classNames from 'classnames'; import RenderHtml from '../renderFunction'; import PropsTypes from './types'; import FormComponent from '../FormComponent'; export default class ElementContainer extends FormComponent { constructor(props: PropsTypes, {}) { super(props); } componentDidMount() { this.validate('true') } render(): JSX.Element { const {errorMessage, caption} = this.props; const uiClass = classNames(`jump-ui-container jump-ui-element-container`, { 'error': !isEmpty(errorMessage), }); return (
{caption}
{this.props.children}
{RenderHtml.renderError(this.error())}
); } }