// Libraries import React, {PureComponent} from 'react' // Styles import 'src/reusable_ui/components/wizard/WizardButtonBar.scss' import {ErrorHandling} from 'src/shared/decorators/errors' interface Props { decrement?: () => void nextLabel?: string previousLabel?: string lastStep?: boolean onClickPrevious: () => void onClickNext: () => void } @ErrorHandling class WizardButtonBar extends PureComponent { public static defaultProps: Partial = { nextLabel: 'next', previousLabel: 'previous', } public render() { const { decrement, previousLabel, nextLabel, onClickPrevious, onClickNext, } = this.props return (
{decrement && ( )}
) } private get buttonColor() { const {lastStep} = this.props if (lastStep) { return 'btn-success' } return 'btn-primary' } } export default WizardButtonBar