UNPKG

jobiqo-cl

Version:

[![CircleCI](https://circleci.com/gh/jobiqo/jobiqo-cl.svg?style=svg&circle-token=5a24efa5b8bbc4879276123e77d0d3f35ca7144c)](https://circleci.com/gh/jobiqo/jobiqo-cl)

20 lines (17 loc) 556 B
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 };