pass join flow image background classes through to relevant steps

This commit is contained in:
Ben Wheeler 2019-10-03 19:25:56 -04:00
parent 6da150d02e
commit e27a7cdbbc
5 changed files with 12 additions and 1 deletions

View file

@ -90,6 +90,7 @@ class BirthDateStep extends React.Component {
} = props; } = props;
return ( return (
<JoinFlowStep <JoinFlowStep
headerImgClass="birthdate-step-image"
headerImgSrc="/images/join-flow/birthdate-header.png" headerImgSrc="/images/join-flow/birthdate-header.png"
innerClassName="join-flow-inner-birthdate-step" innerClassName="join-flow-inner-birthdate-step"
title={this.props.intl.formatMessage({id: 'registration.birthDateStepTitle'})} title={this.props.intl.formatMessage({id: 'registration.birthDateStepTitle'})}

View file

@ -69,6 +69,7 @@ class CountryStep extends React.Component {
} = props; } = props;
return ( return (
<JoinFlowStep <JoinFlowStep
headerImgClass="country-step-image"
headerImgSrc="/images/join-flow/country-header.png" headerImgSrc="/images/join-flow/country-header.png"
innerClassName="join-flow-inner-country-step" innerClassName="join-flow-inner-country-step"
title={this.props.intl.formatMessage({id: 'registration.countryStepTitle'})} title={this.props.intl.formatMessage({id: 'registration.countryStepTitle'})}

View file

@ -151,6 +151,7 @@ class EmailStep extends React.Component {
}} }}
/> />
)} )}
headerImgClass="email-step-image"
headerImgSrc="/images/join-flow/email-header.png" headerImgSrc="/images/join-flow/email-header.png"
innerClassName="join-flow-inner-email-step" innerClassName="join-flow-inner-email-step"
nextButton={this.props.intl.formatMessage({id: 'registration.createAccount'})} nextButton={this.props.intl.formatMessage({id: 'registration.createAccount'})}

View file

@ -14,6 +14,7 @@ const JoinFlowStep = ({
description, description,
descriptionClassName, descriptionClassName,
footerContent, footerContent,
headerImgClass,
headerImgSrc, headerImgSrc,
nextButton, nextButton,
onSubmit, onSubmit,
@ -24,7 +25,12 @@ const JoinFlowStep = ({
<form onSubmit={onSubmit}> <form onSubmit={onSubmit}>
<div className="join-flow-outer-content"> <div className="join-flow-outer-content">
{headerImgSrc && ( {headerImgSrc && (
<div className="join-flow-header-image-wrapper"> <div
className={classNames(
'join-flow-header-image-wrapper',
headerImgClass
)}
>
<img <img
className="join-flow-header-image" className="join-flow-header-image"
src={headerImgSrc} src={headerImgSrc}
@ -80,6 +86,7 @@ JoinFlowStep.propTypes = {
description: PropTypes.string, description: PropTypes.string,
descriptionClassName: PropTypes.string, descriptionClassName: PropTypes.string,
footerContent: PropTypes.oneOfType([PropTypes.string, PropTypes.node]), footerContent: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
headerImgClass: PropTypes.string,
headerImgSrc: PropTypes.string, headerImgSrc: PropTypes.string,
innerClassName: PropTypes.string, innerClassName: PropTypes.string,
nextButton: PropTypes.node, nextButton: PropTypes.node,

View file

@ -43,6 +43,7 @@ class WelcomeStep extends React.Component {
id: 'registration.welcomeStepDescriptionNonEducator' id: 'registration.welcomeStepDescriptionNonEducator'
})} })}
descriptionClassName="join-flow-welcome-description" descriptionClassName="join-flow-welcome-description"
headerImgClass="welcome-step-image"
headerImgSrc="/images/join-flow/welcome-header.png" headerImgSrc="/images/join-flow/welcome-header.png"
innerClassName="join-flow-inner-welcome-step" innerClassName="join-flow-inner-welcome-step"
nextButton={this.props.createProjectOnComplete ? ( nextButton={this.props.createProjectOnComplete ? (