Misc Frontend Updates

This commit is contained in:
Qstick 2017-09-26 21:33:39 -04:00
parent 729d1142b0
commit f69559e4da
11 changed files with 107 additions and 46 deletions

View file

@ -1,6 +1,7 @@
import PropTypes from 'prop-types';
import React from 'react';
import styles from './Form.css';
import { kinds } from 'Helpers/Props';
import Alert from 'Components/Alert';
function Form({ children, validationErrors, validationWarnings, ...otherProps }) {
return (
@ -9,12 +10,12 @@ function Form({ children, validationErrors, validationWarnings, ...otherProps })
{
validationErrors.map((error, index) => {
return (
<div
<Alert
key={index}
className={styles.error}
kind={kinds.DANGER}
>
{error.errorMessage}
</div>
</Alert>
);
})
}
@ -22,12 +23,12 @@ function Form({ children, validationErrors, validationWarnings, ...otherProps })
{
validationWarnings.map((warning, index) => {
return (
<div
<Alert
key={index}
className={styles.error}
kind={kinds.WARNING}
>
{warning.errorMessage}
</div>
</Alert>
);
})
}