import React from 'react' import Text from './text' export default class Form extends React.PureComponent { static propTypes = { children: PropTypes.any, errorMessage: PropTypes.string, onSubmit: PropTypes.func.isRequired, } componentDidUpdate (prevProps) { } render() { const { children, errorMessage, onSubmit, } = this.props return (
{ !!errorMessage && {errorMessage} }
{children}
) } }