@storybook/addon-backgrounds 6.1.7 → 6.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/decorators/withGrid.js +3 -3
- package/package.json +15 -15
|
@@ -42,7 +42,7 @@ function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(
|
|
|
42
42
|
var deprecatedCellSizeWarning = (0, _utilDeprecate["default"])(function () {}, (0, _tsDedent["default"])(_templateObject()));
|
|
43
43
|
|
|
44
44
|
var withGrid = function withGrid(StoryFn, context) {
|
|
45
|
-
var _globals$BACKGROUNDS_, _parameters$grid;
|
|
45
|
+
var _globals$BACKGROUNDS_, _parameters$grid, _gridParameters$offse, _gridParameters$offse2;
|
|
46
46
|
|
|
47
47
|
var globals = context.globals,
|
|
48
48
|
parameters = context.parameters;
|
|
@@ -64,8 +64,8 @@ var withGrid = function withGrid(StoryFn, context) {
|
|
|
64
64
|
var isLayoutPadded = parameters.layout === undefined || parameters.layout === 'padded'; // 16px offset in the grid to account for padded layout
|
|
65
65
|
|
|
66
66
|
var defaultOffset = isLayoutPadded ? 16 : 0;
|
|
67
|
-
var offsetX = gridParameters.offsetX
|
|
68
|
-
var offsetY = gridParameters.offsetY
|
|
67
|
+
var offsetX = (_gridParameters$offse = gridParameters.offsetX) !== null && _gridParameters$offse !== void 0 ? _gridParameters$offse : isInDocs ? 20 : defaultOffset;
|
|
68
|
+
var offsetY = (_gridParameters$offse2 = gridParameters.offsetY) !== null && _gridParameters$offse2 !== void 0 ? _gridParameters$offse2 : isInDocs ? 20 : defaultOffset;
|
|
69
69
|
var gridStyles = (0, _addons.useMemo)(function () {
|
|
70
70
|
var selector = context.viewMode === 'docs' ? "#anchor--".concat(context.id, " .docs-story") : '.sb-show-main';
|
|
71
71
|
var backgroundSize = ["".concat(gridSize * cellAmount, "px ").concat(gridSize * cellAmount, "px"), "".concat(gridSize * cellAmount, "px ").concat(gridSize * cellAmount, "px"), "".concat(gridSize, "px ").concat(gridSize, "px"), "".concat(gridSize, "px ").concat(gridSize, "px")].join(', ');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-backgrounds",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.11",
|
|
4
4
|
"description": "A storybook addon to show different backgrounds for your preview",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -21,13 +21,6 @@
|
|
|
21
21
|
"author": "jbaxleyiii",
|
|
22
22
|
"main": "dist/index.js",
|
|
23
23
|
"types": "dist/index.d.ts",
|
|
24
|
-
"typesVersions": {
|
|
25
|
-
"<3.8": {
|
|
26
|
-
"*": [
|
|
27
|
-
"ts3.4/*"
|
|
28
|
-
]
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
24
|
"files": [
|
|
32
25
|
"dist/**/*",
|
|
33
26
|
"README.md",
|
|
@@ -39,12 +32,12 @@
|
|
|
39
32
|
"prepare": "node ../../scripts/prepare.js"
|
|
40
33
|
},
|
|
41
34
|
"dependencies": {
|
|
42
|
-
"@storybook/addons": "6.1.
|
|
43
|
-
"@storybook/api": "6.1.
|
|
44
|
-
"@storybook/client-logger": "6.1.
|
|
45
|
-
"@storybook/components": "6.1.
|
|
46
|
-
"@storybook/core-events": "6.1.
|
|
47
|
-
"@storybook/theming": "6.1.
|
|
35
|
+
"@storybook/addons": "6.1.11",
|
|
36
|
+
"@storybook/api": "6.1.11",
|
|
37
|
+
"@storybook/client-logger": "6.1.11",
|
|
38
|
+
"@storybook/components": "6.1.11",
|
|
39
|
+
"@storybook/core-events": "6.1.11",
|
|
40
|
+
"@storybook/theming": "6.1.11",
|
|
48
41
|
"core-js": "^3.0.1",
|
|
49
42
|
"global": "^4.3.2",
|
|
50
43
|
"memoizerific": "^1.11.3",
|
|
@@ -70,5 +63,12 @@
|
|
|
70
63
|
"publishConfig": {
|
|
71
64
|
"access": "public"
|
|
72
65
|
},
|
|
73
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "5999b789d796414997c21d74517f7dfede6ddeff",
|
|
67
|
+
"typesVersions": {
|
|
68
|
+
"<3.8": {
|
|
69
|
+
"*": [
|
|
70
|
+
"ts3.4/*"
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
74
|
}
|