Unverified Commit ff3c91f9 authored by Benjamin Wheeler's avatar Benjamin Wheeler Committed by GitHub

Merge pull request #3186 from benjiwheeler/join-flow-add-images

Join flow add images
parents 4a01fabf 1803641a
...@@ -87,7 +87,7 @@ class BirthDateStep extends React.Component { ...@@ -87,7 +87,7 @@ class BirthDateStep extends React.Component {
return ( return (
<JoinFlowStep <JoinFlowStep
description={this.props.intl.formatMessage({id: 'registration.private'})} description={this.props.intl.formatMessage({id: 'registration.private'})}
headerImgSrc="/images/hoc/getting-started.jpg" headerImgSrc="/images/join-flow/birthdate-header.png"
infoMessage={this.props.intl.formatMessage({id: 'registration.birthDateStepInfo'})} infoMessage={this.props.intl.formatMessage({id: 'registration.birthDateStepInfo'})}
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'})}
......
...@@ -68,7 +68,7 @@ class CountryStep extends React.Component { ...@@ -68,7 +68,7 @@ class CountryStep extends React.Component {
return ( return (
<JoinFlowStep <JoinFlowStep
description={this.props.intl.formatMessage({id: 'registration.countryStepDescription'})} description={this.props.intl.formatMessage({id: 'registration.countryStepDescription'})}
headerImgSrc="/images/hoc/getting-started.jpg" 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'})}
waiting={isSubmitting} waiting={isSubmitting}
......
...@@ -74,7 +74,7 @@ class EmailStep extends React.Component { ...@@ -74,7 +74,7 @@ class EmailStep extends React.Component {
}} }}
/> />
)} )}
headerImgSrc="/images/hoc/getting-started.jpg" 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'})}
title={this.props.intl.formatMessage({id: 'registration.emailStepTitle'})} title={this.props.intl.formatMessage({id: 'registration.emailStepTitle'})}
......
...@@ -25,8 +25,11 @@ const JoinFlowStep = ({ ...@@ -25,8 +25,11 @@ 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"> <div className="join-flow-header-image-wrapper">
<img src={headerImgSrc} /> <img
className="join-flow-header-image"
src={headerImgSrc}
/>
</div> </div>
)} )}
<div> <div>
......
...@@ -33,15 +33,20 @@ ...@@ -33,15 +33,20 @@
} }
/* overflow will only work if this class is set on parent of img, not img itself */ /* overflow will only work if this class is set on parent of img, not img itself */
.join-flow-header-image { .join-flow-header-image-wrapper {
width: 100%; width: 100%;
height: 7.5rem; min-height: 7.5rem;
max-height: 8.75rem;
overflow: hidden; overflow: hidden;
margin: 0; margin: 0;
border-top-left-radius: 1rem; border-top-left-radius: 1rem;
border-top-right-radius: 1rem; border-top-right-radius: 1rem;
} }
.join-flow-header-image {
width: 27.5rem;
}
.join-flow-footer-message { .join-flow-footer-message {
width: 100%; width: 100%;
padding: 1.125rem 1.5rem 1.125rem; padding: 1.125rem 1.5rem 1.125rem;
......
...@@ -44,7 +44,7 @@ class WelcomeStep extends React.Component { ...@@ -44,7 +44,7 @@ class WelcomeStep extends React.Component {
description={this.props.intl.formatMessage({ description={this.props.intl.formatMessage({
id: 'registration.welcomeStepDescriptionNonEducator' id: 'registration.welcomeStepDescriptionNonEducator'
})} })}
headerImgSrc="/images/hoc/getting-started.jpg" headerImgSrc="/images/join-flow/welcome-header.png"
innerClassName="join-flow-inner-welcome-step" innerClassName="join-flow-inner-welcome-step"
nextButton={ nextButton={
<React.Fragment> <React.Fragment>
......
...@@ -20,7 +20,7 @@ describe('JoinFlowStep', () => { ...@@ -20,7 +20,7 @@ describe('JoinFlowStep', () => {
{...props} {...props}
/> />
); );
expect(component.find('div.join-flow-header-image').exists()).toEqual(true); expect(component.find('img.join-flow-header-image').exists()).toEqual(true);
expect(component.find({src: props.headerImgSrc}).exists()).toEqual(true); expect(component.find({src: props.headerImgSrc}).exists()).toEqual(true);
expect(component.find('.join-flow-inner-content').exists()).toEqual(true); expect(component.find('.join-flow-inner-content').exists()).toEqual(true);
expect(component.find('.join-flow-title').exists()).toEqual(true); expect(component.find('.join-flow-title').exists()).toEqual(true);
...@@ -39,7 +39,7 @@ describe('JoinFlowStep', () => { ...@@ -39,7 +39,7 @@ describe('JoinFlowStep', () => {
<JoinFlowStep /> <JoinFlowStep />
); );
expect(component.find('div.join-flow-header-image').exists()).toEqual(false); expect(component.find('img.join-flow-header-image').exists()).toEqual(false);
expect(component.find('.join-flow-inner-content').exists()).toEqual(true); expect(component.find('.join-flow-inner-content').exists()).toEqual(true);
expect(component.find('.join-flow-title').exists()).toEqual(false); expect(component.find('.join-flow-title').exists()).toEqual(false);
expect(component.find('div.join-flow-description').exists()).toEqual(false); expect(component.find('div.join-flow-description').exists()).toEqual(false);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment