|
|
|
@ -2,11 +2,14 @@ import PropTypes from 'prop-types';
|
|
|
|
|
import React from 'react';
|
|
|
|
|
import { kinds } from 'Helpers/Props';
|
|
|
|
|
import Alert from 'Components/Alert';
|
|
|
|
|
import styles from './Form.css';
|
|
|
|
|
|
|
|
|
|
function Form({ children, validationErrors, validationWarnings, ...otherProps }) {
|
|
|
|
|
return (
|
|
|
|
|
<div>
|
|
|
|
|
<div>
|
|
|
|
|
{
|
|
|
|
|
validationErrors.length || validationWarnings.length ?
|
|
|
|
|
<div className={styles.validationFailures}>
|
|
|
|
|
{
|
|
|
|
|
validationErrors.map((error, index) => {
|
|
|
|
|
return (
|
|
|
|
@ -32,7 +35,9 @@ function Form({ children, validationErrors, validationWarnings, ...otherProps })
|
|
|
|
|
);
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
</div>
|
|
|
|
|
</div> :
|
|
|
|
|
null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
{children}
|
|
|
|
|
</div>
|
|
|
|
|