1 | "use strict";
|
2 |
|
3 | require("core-js/modules/es.object.assign");
|
4 |
|
5 | Object.defineProperty(exports, "__esModule", {
|
6 | value: true
|
7 | });
|
8 | exports["default"] = void 0;
|
9 |
|
10 | var _addons = require("@storybook/addons");
|
11 |
|
12 | var _Centered = _interopRequireDefault(require("./components/Centered.svelte"));
|
13 |
|
14 | var _styles = _interopRequireDefault(require("./styles"));
|
15 |
|
16 | var _json2CSS = _interopRequireDefault(require("./helpers/json2CSS"));
|
17 |
|
18 | var _parameters = _interopRequireDefault(require("./parameters"));
|
19 |
|
20 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
21 |
|
22 | var centeredStyles = {
|
23 |
|
24 | style: (0, _json2CSS["default"])(_styles["default"].style),
|
25 |
|
26 |
|
27 | innerStyle: (0, _json2CSS["default"])(_styles["default"].innerStyle)
|
28 | };
|
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 | function centered(storyFn) {
|
40 | var _storyFn = storyFn(),
|
41 | OriginalComponent = _storyFn.Component,
|
42 | props = _storyFn.props,
|
43 | on = _storyFn.on;
|
44 |
|
45 | return {
|
46 | Component: OriginalComponent,
|
47 | props: props,
|
48 | on: on,
|
49 | Wrapper: _Centered["default"],
|
50 | WrapperData: centeredStyles
|
51 | };
|
52 | }
|
53 |
|
54 | var _default = (0, _addons.makeDecorator)(Object.assign({}, _parameters["default"], {
|
55 | wrapper: function wrapper(getStory) {
|
56 | return centered(getStory);
|
57 | }
|
58 | }));
|
59 |
|
60 | exports["default"] = _default;
|
61 |
|
62 | if (module && module.hot && module.hot.decline) {
|
63 | module.hot.decline();
|
64 | } |
\ | No newline at end of file |