diff --git a/src/components/formik-forms/formik-input.jsx b/src/components/formik-forms/formik-input.jsx index 66f74607e..5b0b54f8f 100644 --- a/src/components/formik-forms/formik-input.jsx +++ b/src/components/formik-forms/formik-input.jsx @@ -5,12 +5,14 @@ import {Field} from 'formik'; const ValidationMessage = require('../forms/validation-message.jsx'); +require('./forms.scss'); require('../forms/input.scss'); require('../forms/row.scss'); const FormikInput = ({ className, error, + inline, validationClassName, wrapperClassName, ...props @@ -43,9 +45,14 @@ const FormikInput = ({ FormikInput.propTypes = { className: PropTypes.string, error: PropTypes.string, + inline: PropTypes.bool, type: PropTypes.string, - validationClassName: PropTypes.string + validationClassName: PropTypes.string, wrapperClassName: PropTypes.string }; +FormikInput.defaultProps = { + inline: false +}; + module.exports = FormikInput; diff --git a/src/components/forms/row.scss b/src/components/forms/row.scss index 19dc2c351..db78d5c45 100644 --- a/src/components/forms/row.scss +++ b/src/components/forms/row.scss @@ -30,3 +30,13 @@ margin-bottom: .75rem; line-height: 1.7rem; } + +.row-inline { + display: flex; +} + +/* override margin-bottom so placing a label next to a radio button does not +mess up vertical alignment */ +.row-inline label { + margin-bottom: 0; +}