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.
17 lines • 553 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getInitialStep = void 0;
var getInitialStep = function (args) {
var _a;
switch (args.wizardType) {
case 'linearN':
return 1;
case 'linearS':
case 'nested':
return ((_a = args.options) !== null && _a !== void 0 ? _a : [])[0];
default:
throw new Error("Wizard error: wrong first step, open an issue");
}
};
exports.getInitialStep = getInitialStep;
//# sourceMappingURL=getInitialStep.js.map