wix-storybook-utils
Version:
Utilities for automated component documentation within Storybook
8 lines • 422 B
JavaScript
import * as queryString from 'query-string';
export 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 };
};
//# sourceMappingURL=getCustomQueryParams.js.map