add birthdate header image

This commit is contained in:
Ben Wheeler 2019-07-17 12:40:21 -04:00
parent d6c34f83ae
commit 9539afd0e2
3 changed files with 18 additions and 0 deletions

View file

@ -10,11 +10,17 @@ require('./join-flow-step.scss');
const JoinFlowStep = ({ const JoinFlowStep = ({
children, children,
description, description,
headerImgSrc,
onSubmit, onSubmit,
title, title,
waiting waiting
}) => ( }) => (
<form onSubmit={onSubmit}> <form onSubmit={onSubmit}>
{headerImgSrc && (
<div className="join-flow-header-image">
<img src={headerImgSrc} />
</div>
)}
<div> <div>
<ModalInnerContent className="join-flow-inner-content"> <ModalInnerContent className="join-flow-inner-content">
{title && ( {title && (
@ -38,6 +44,7 @@ const JoinFlowStep = ({
JoinFlowStep.propTypes = { JoinFlowStep.propTypes = {
children: PropTypes.node, children: PropTypes.node,
description: PropTypes.string, description: PropTypes.string,
headerImgSrc: PropTypes.string,
onSubmit: PropTypes.func, onSubmit: PropTypes.func,
title: PropTypes.string, title: PropTypes.string,
waiting: PropTypes.bool waiting: PropTypes.bool

View file

@ -21,3 +21,13 @@
padding: 2.3125rem 0 2.5rem; padding: 2.3125rem 0 2.5rem;
font-size: .875rem; font-size: .875rem;
} }
/* overflow will only work if this class is set on parent of img, not img itself */
.join-flow-header-image {
width: 100%;
height: 7.5rem;
overflow: hidden;
margin: 0;
border-top-left-radius: 1rem;
border-top-right-radius: 1rem;
}

View file

@ -274,6 +274,7 @@ class BirthDateStep extends React.Component {
return ( return (
<JoinFlowStep <JoinFlowStep
description={this.props.intl.formatMessage({id: 'registration.birthDateStepDescription'})} description={this.props.intl.formatMessage({id: 'registration.birthDateStepDescription'})}
headerImgSrc="/images/hoc/getting-started.jpg"
title={this.props.intl.formatMessage({id: 'general.joinScratch'})} title={this.props.intl.formatMessage({id: 'general.joinScratch'})}
waiting={isSubmitting} waiting={isSubmitting}
onSubmit={handleSubmit} onSubmit={handleSubmit}