UNPKG

use-wizard

Version:

A dead-easy-to-use light-weight react hook to handle multi-paths wizards (and simple wizards too) and navigate into them.

11 lines (9 loc) 346 B
import {isTypeLinearS} from "../types/typeGuards/isTypeLinearS"; export {getWizardLength}; const getWizardLength = (args: { options: any }) => (): number => { if(!isTypeLinearS(args.options)) { console.log('Wizard warning: method getWizardLength does not work with this type of wizard'); return -1; } return args.options.length; }