jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
23 lines (20 loc) • 1.2 kB
JavaScript
import React__default, { useContext } from 'react';
import { CheckDoubleIcon } from '../../../../icons/CheckDouble.js';
import { WizardContext } from '../context/index.js';
import { WizardSteps, WizardStep, WizardStepNumber, WizardConnector } from '../styles/index.js';
/**
* @file index.tsx
*
* @fileoverview Renders the title for each step.
*/
const WizardStepsInfo = () => {
const wizardContext = useContext(WizardContext);
const { currentStep, steps } = wizardContext;
return (React__default.createElement(WizardSteps, null, steps.map((stepInfo, index) => (React__default.createElement(React__default.Fragment, { key: index },
React__default.createElement(WizardStep, null,
React__default.createElement(WizardStepNumber, { active: index <= currentStep - 1 }, index < currentStep - 1 ? (React__default.createElement(CheckDoubleIcon, { height: "12", width: "12", title: "Checked" })) : (index + 1)),
React__default.createElement("span", null, stepInfo)),
index < steps.length - 1 && (React__default.createElement(WizardConnector, null,
React__default.createElement("span", null))))))));
};
export { WizardStepsInfo };