From e22a848350c2d4d7f6c7761c11a708a54193d498 Mon Sep 17 00:00:00 2001 From: Ben Wheeler Date: Fri, 26 Jul 2019 13:46:37 -0400 Subject: [PATCH] add GenderOption component to handle most gender radio options --- src/components/join-flow/gender-step.jsx | 115 +++++++++++------------ 1 file changed, 54 insertions(+), 61 deletions(-) diff --git a/src/components/join-flow/gender-step.jsx b/src/components/join-flow/gender-step.jsx index 0a64a68ed..e13550b74 100644 --- a/src/components/join-flow/gender-step.jsx +++ b/src/components/join-flow/gender-step.jsx @@ -10,6 +10,42 @@ const JoinFlowStep = require('./join-flow-step.jsx'); require('./join-flow-steps.scss'); +const GenderOption = ({ + label, + onSetFieldValue, + selectedValue, + value +}) => ( +
onSetFieldValue('gender', value, false)} + /* eslint-enable react/jsx-no-bind */ + > + +
+); + +GenderOption.propTypes = { + label: PropTypes.string, + onSetFieldValue: PropTypes.function, + selectedValue: PropTypes.string, + value: PropTypes.string +}; + class GenderStep extends React.Component { constructor (props) { super(props); @@ -58,6 +94,18 @@ class GenderStep extends React.Component { waiting={isSubmitting} onSubmit={handleSubmit} > + +
{values.gender} - - - - {/* - // - // - // - // */}
+ ); }}