@storybook/addon-ondevice-notes 5.3.22 → 5.3.26
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/components/Notes.js +3 -3
- package/package.json +4 -4
package/dist/components/Notes.js
CHANGED
|
@@ -5,7 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var react_1 = __importDefault(require("react"));
|
|
7
7
|
var react_native_1 = require("react-native");
|
|
8
|
-
var
|
|
8
|
+
var react_native_sm_markdown_1 = __importDefault(require("react-native-sm-markdown"));
|
|
9
9
|
var core_1 = require("@emotion/core");
|
|
10
10
|
exports.PARAM_KEY = "notes";
|
|
11
11
|
exports.Notes = function (_a) {
|
|
@@ -14,12 +14,12 @@ exports.Notes = function (_a) {
|
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
16
16
|
var selection = api.store().getSelection();
|
|
17
|
-
if (!selection) {
|
|
17
|
+
if (!selection || !Object.keys(selection).length) {
|
|
18
18
|
return null;
|
|
19
19
|
}
|
|
20
20
|
var story = api.store().fromId(selection.storyId);
|
|
21
21
|
var text = story.parameters[exports.PARAM_KEY];
|
|
22
22
|
var textAfterFormatted = text ? text.trim() : '';
|
|
23
23
|
return (react_1.default.createElement(react_native_1.View, { style: { padding: 10, flex: 1 } },
|
|
24
|
-
react_1.default.createElement(core_1.ThemeContext.Consumer, null, function (theme) { return (react_1.default.createElement(
|
|
24
|
+
react_1.default.createElement(core_1.ThemeContext.Consumer, null, function (theme) { return (react_1.default.createElement(react_native_sm_markdown_1.default, { styles: { text: { color: theme.labelColor } } }, textAfterFormatted)); })));
|
|
25
25
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-ondevice-notes",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.26",
|
|
4
4
|
"description": "Write notes for your react-native Storybook stories.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"addon",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
],
|
|
11
11
|
"repository": {
|
|
12
12
|
"type": "git",
|
|
13
|
-
"url": "https://github.com/storybookjs/
|
|
13
|
+
"url": "https://github.com/storybookjs/react-native.git",
|
|
14
14
|
"directory": "addons/ondevice-notes"
|
|
15
15
|
},
|
|
16
16
|
"license": "MIT",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@storybook/core-events": "5.3.21",
|
|
36
36
|
"core-js": "^3.0.1",
|
|
37
37
|
"prop-types": "^15.7.2",
|
|
38
|
-
"react-native-
|
|
38
|
+
"react-native-sm-markdown": "^0.0.1"
|
|
39
39
|
},
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"react": "*",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "12374f5c7feff41c607f3eba4179c81811a225be"
|
|
48
48
|
}
|