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()}
</div>
<Footer step={channelform.step} />
<Footer step={channelform.step} changeStep={changeStep} />
</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 styles from './Footer.scss'
const Footer = ({ step }) => {
const Footer = ({ step, changeStep }) => {
if ( step === 1 ) { return null }
if (step === 4 ) { return null }
return (
<div className={styles.footer}>
<div className='buttonContainer circleContainer'>
<div className='buttonPrimary circle'>
<div className='buttonPrimary circle'onClick={() => changeStep(step - 1)}>
<FaArrowLeft />
</div>
</div>
<div className='buttonContainer circleContainer'>
<div className='buttonContainer circleContainer' onClick={() => changeStep(step + 1)}>
<div className='buttonPrimary circle'>
<FaArrowRight />
</div>

Loading…
Cancel
Save