@storybook/react-native-ui 10.1.0 → 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 CHANGED
@@ -1913,6 +1913,9 @@ var Layout = ({
1913
1913
  true
1914
1914
  );
1915
1915
  const [uiHidden, setUiHidden] = (0, import_react18.useState)(false);
1916
+ (0, import_react18.useLayoutEffect)(() => {
1917
+ setUiHidden(story?.parameters?.storybookUIVisibility === "hidden");
1918
+ }, [story?.parameters?.storybookUIVisibility]);
1916
1919
  const desktopSidebarStyle = (0, import_react_native_ui_common7.useStyle)(
1917
1920
  () => ({
1918
1921
  width: desktopSidebarOpen ? 240 : void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-native-ui",
3
- "version": "10.1.0",
3
+ "version": "10.1.1",
4
4
  "description": "ui components for react native storybook",
5
5
  "keywords": [
6
6
  "react",
@@ -58,9 +58,9 @@
58
58
  },
59
59
  "dependencies": {
60
60
  "@gorhom/portal": "^1.0.14",
61
- "@storybook/react": "^10.1.0",
62
- "@storybook/react-native-theming": "^10.1.0",
63
- "@storybook/react-native-ui-common": "^10.1.0",
61
+ "@storybook/react": "^10.1.1",
62
+ "@storybook/react-native-theming": "^10.1.1",
63
+ "@storybook/react-native-ui-common": "^10.1.1",
64
64
  "fuse.js": "^7.1.0",
65
65
  "polished": "^4.3.1"
66
66
  },
@@ -80,5 +80,5 @@
80
80
  "publishConfig": {
81
81
  "access": "public"
82
82
  },
83
- "gitHead": "af8cee5245b3a91761a4a07ae4bb695192c0a4c0"
83
+ "gitHead": "b2993c683ff3782b7d6cb84c5146797f410d2ead"
84
84
  }
package/src/Layout.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { BottomSheetModalProvider } from '@gorhom/bottom-sheet';
2
- import { PortalHost, PortalProvider } from '@gorhom/portal';
2
+ import { PortalHost } from '@gorhom/portal';
3
3
  import type { ReactRenderer } from '@storybook/react';
4
4
  import { styled, ThemeProvider, useTheme } from '@storybook/react-native-theming';
5
5
  import {
@@ -11,7 +11,7 @@ import {
11
11
  useStyle,
12
12
  type SBUI,
13
13
  } from '@storybook/react-native-ui-common';
14
- import { ReactNode, useCallback, useRef, useState } from 'react';
14
+ import { ReactNode, useCallback, useLayoutEffect, useRef, useState } from 'react';
15
15
  import { ScrollView, Text, TouchableOpacity, View, ViewStyle } from 'react-native';
16
16
  import { GestureHandlerRootView } from 'react-native-gesture-handler';
17
17
  import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
@@ -108,6 +108,10 @@ export const Layout = ({
108
108
 
109
109
  const [uiHidden, setUiHidden] = useState(false);
110
110
 
111
+ useLayoutEffect(() => {
112
+ setUiHidden(story?.parameters?.storybookUIVisibility === 'hidden');
113
+ }, [story?.parameters?.storybookUIVisibility]);
114
+
111
115
  const desktopSidebarStyle = useStyle(
112
116
  () => ({
113
117
  width: desktopSidebarOpen ? 240 : undefined,