import React from 'react'; import classes from './WizardStepBar.module.css'; import { IconChevronLeft, IconChevronRight } from '@tabler/icons-react'; type WizardStepBarProps = { step: number; setStep: (step: number) => void; previousStepHandler: () => void; nextStepHandler: () => void; }; function WizardStepBar(props: WizardStepBarProps) { //Color onClick on a step const colorHandler = (step: number) => { if (step <= props.step) { return classes.active; } else { return classes.inactive; } }; //Color onClick on next step button const colorChevronNextStep = () => { if (props.step < 4) { return classes.activeChevron; } else { return classes.inactiveChevron; } }; //Color onClick on previous step button const colorChevronPreviousStep = () => { if (props.step > 1) { return classes.activeChevron; } else { return classes.inactiveChevron; } }; return (
); } export default WizardStepBar;