@storybook/react-native 10.1.0-beta.5 → 10.1.1
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/index.js +11 -3
- package/package.json +7 -7
package/dist/index.js
CHANGED
|
@@ -813,17 +813,25 @@ var errorContainerStyle = {
|
|
|
813
813
|
alignItems: "center",
|
|
814
814
|
justifyContent: "center"
|
|
815
815
|
};
|
|
816
|
+
var layoutStyles = {
|
|
817
|
+
padded: { padding: 8 },
|
|
818
|
+
centered: { alignItems: "center", justifyContent: "center" },
|
|
819
|
+
fullscreen: {}
|
|
820
|
+
};
|
|
816
821
|
var StoryView = ({ useWrapper = true }) => {
|
|
817
822
|
const context = useStoryContext();
|
|
818
823
|
const id = context?.id;
|
|
819
824
|
const theme3 = (0, import_react_native_theming.useTheme)();
|
|
820
825
|
const containerStyle = (0, import_react3.useMemo)(() => {
|
|
826
|
+
const layout = context?.parameters?.layout;
|
|
827
|
+
const layoutStyle = layout ? layoutStyles[layout] : {};
|
|
821
828
|
return {
|
|
822
829
|
flex: 1,
|
|
823
830
|
backgroundColor: theme3.background?.content,
|
|
824
|
-
overflow: "hidden"
|
|
831
|
+
overflow: "hidden",
|
|
832
|
+
...layoutStyle
|
|
825
833
|
};
|
|
826
|
-
}, [theme3.background?.content]);
|
|
834
|
+
}, [theme3.background?.content, context?.parameters?.layout]);
|
|
827
835
|
const onError = (0, import_react3.useCallback)(() => {
|
|
828
836
|
console.log(`Error rendering story for ${context?.title} ${context?.name}`);
|
|
829
837
|
}, [context?.title, context?.name]);
|
|
@@ -845,7 +853,7 @@ var StoryView = ({ useWrapper = true }) => {
|
|
|
845
853
|
}
|
|
846
854
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ErrorBoundary, { onError, children: StoryComponent && /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(StoryComponent, { ...context }) });
|
|
847
855
|
}
|
|
848
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: errorContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text2, { children: "Please
|
|
856
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react_native2.View, { style: errorContainerStyle, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text2, { children: "Please select a story to preview." }) });
|
|
849
857
|
};
|
|
850
858
|
var StoryView_default = import_react3.default.memo(StoryView);
|
|
851
859
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.1",
|
|
4
4
|
"description": "A better way to develop React Native Components for your app",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"test:generate:update": "node --test --test-update-snapshots scripts/generate.test.js"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@storybook/react": "10.1.
|
|
52
|
-
"@storybook/react-native-theming": "^10.1.
|
|
53
|
-
"@storybook/react-native-ui": "^10.1.
|
|
54
|
-
"@storybook/react-native-ui-common": "^10.1.
|
|
51
|
+
"@storybook/react": "^10.1.1",
|
|
52
|
+
"@storybook/react-native-theming": "^10.1.1",
|
|
53
|
+
"@storybook/react-native-ui": "^10.1.1",
|
|
54
|
+
"@storybook/react-native-ui-common": "^10.1.1",
|
|
55
55
|
"commander": "^14.0.2",
|
|
56
56
|
"dedent": "^1.7.0",
|
|
57
57
|
"deepmerge": "^4.3.1",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"jotai": "^2.6.2",
|
|
70
70
|
"react": "19.1.0",
|
|
71
71
|
"react-native": "0.81.5",
|
|
72
|
-
"storybook": "10.1.
|
|
72
|
+
"storybook": "^10.1.1",
|
|
73
73
|
"tsup": "^8.5.0",
|
|
74
74
|
"typescript": "~5.9.3",
|
|
75
75
|
"universal-test-renderer": "^0.6.0"
|
|
@@ -103,5 +103,5 @@
|
|
|
103
103
|
"publishConfig": {
|
|
104
104
|
"access": "public"
|
|
105
105
|
},
|
|
106
|
-
"gitHead": "
|
|
106
|
+
"gitHead": "b2993c683ff3782b7d6cb84c5146797f410d2ead"
|
|
107
107
|
}
|