Browse Source

feature(channelform footer): hook up buttons if not step 1 or 4

renovate/lint-staged-8.x
Jack Mallers 7 years ago
parent
commit
73b5ef8832
  1. 2
      app/components/ChannelForm/ChannelForm.js
  2. 8
      app/components/ChannelForm/Footer.js

2
app/components/ChannelForm/ChannelForm.js

@ -52,7 +52,7 @@ const ChannelForm = ({
{renderStep()} {renderStep()}
</div> </div>
<Footer step={channelform.step} /> <Footer step={channelform.step} changeStep={changeStep} />
</ReactModal> </ReactModal>
) )
} }

8
app/components/ChannelForm/Footer.js

@ -3,17 +3,19 @@ import PropTypes from 'prop-types'
import { FaArrowLeft, FaArrowRight } from 'react-icons/lib/fa' import { FaArrowLeft, FaArrowRight } from 'react-icons/lib/fa'
import styles from './Footer.scss' import styles from './Footer.scss'
const Footer = ({ step }) => { const Footer = ({ step, changeStep }) => {
if ( step === 1 ) { return null } if ( step === 1 ) { return null }
if (step === 4 ) { return null }
return ( return (
<div className={styles.footer}> <div className={styles.footer}>
<div className='buttonContainer circleContainer'> <div className='buttonContainer circleContainer'>
<div className='buttonPrimary circle'> <div className='buttonPrimary circle'onClick={() => changeStep(step - 1)}>
<FaArrowLeft /> <FaArrowLeft />
</div> </div>
</div> </div>
<div className='buttonContainer circleContainer'> <div className='buttonContainer circleContainer' onClick={() => changeStep(step + 1)}>
<div className='buttonPrimary circle'> <div className='buttonPrimary circle'>
<FaArrowRight /> <FaArrowRight />
</div> </div>

Loading…
Cancel
Save