wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
13 lines • 636 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getCustomQueryParams = void 0;
var tslib_1 = require("tslib");
var queryString = tslib_1.__importStar(require("query-string"));
var getCustomQueryParams = function (storyName) {
var previewId = queryString.parse(window.location.search).previewId || null;
var story = queryString.parse(window.location.search).storyName || null;
var isPreview = storyName === story && previewId;
return { previewId: previewId, enabled: isPreview };
};
exports.getCustomQueryParams = getCustomQueryParams;
//# sourceMappingURL=getCustomQueryParams.js.map