jobiqo-cl
Version:
[](https://circleci.com/gh/jobiqo/jobiqo-cl)
20 lines (17 loc) • 556 B
JavaScript
import React__default, { useContext } from 'react';
import { WizardContext } from '../context/index.js';
/**
* @file index.tsx
*
* @fileoverview Renders a step of the wizard.
*/
const WizardStep = ({ children, stepIndex }) => {
const wizardContext = useContext(WizardContext);
if (wizardContext.currentStep !== stepIndex) {
// Prop: The current step
return null;
}
// The markup for the Step 1 UI
return React__default.createElement(React__default.Fragment, null, children);
};
export { WizardStep };