diff --git a/src/components/formik-forms/formik-input.jsx b/src/components/formik-forms/formik-input.jsx index ab62130a0..0788d0b9c 100644 --- a/src/components/formik-forms/formik-input.jsx +++ b/src/components/formik-forms/formik-input.jsx @@ -11,9 +11,10 @@ require('../forms/row.scss'); const FormikInput = ({ className, error, + validationClassName, ...props }) => ( -
+
{error && ( - + )}
); @@ -31,7 +35,8 @@ const FormikInput = ({ FormikInput.propTypes = { className: PropTypes.string, error: PropTypes.string, - type: PropTypes.string + type: PropTypes.string, + validationClassName: PropTypes.string }; module.exports = FormikInput; diff --git a/src/components/forms/row.scss b/src/components/forms/row.scss index 17a8e3fa8..19dc2c351 100644 --- a/src/components/forms/row.scss +++ b/src/components/forms/row.scss @@ -21,6 +21,11 @@ } } +/* allow elements such as validation errors to position relative to this row */ +.row-with-tooltip { + position: relative; +} + .row-label { margin-bottom: .75rem; line-height: 1.7rem; diff --git a/src/components/join-flow/join-flow-steps.jsx b/src/components/join-flow/join-flow-steps.jsx index 1a03396dd..c612853cd 100644 --- a/src/components/join-flow/join-flow-steps.jsx +++ b/src/components/join-flow/join-flow-steps.jsx @@ -10,6 +10,8 @@ const validate = require('../../lib/validate'); const FormikInput = require('../../components/formik-forms/formik-input.jsx'); const JoinFlowStep = require('./join-flow-step.jsx'); +require('./join-flow-steps.scss'); + /* * Username step */ @@ -127,6 +129,7 @@ class UsernameStep extends React.Component { id="username" name="username" validate={this.validateUsernameIfPresent} + validationClassName="validation-full-width-input" onBlur={() => validateField('username')} // eslint-disable-line react/jsx-no-bind />