From e4ceaf26b37eb27ca6a878ef0aceb0489eae1793 Mon Sep 17 00:00:00 2001 From: Daniel Williams Date: Mon, 20 Jan 2025 23:02:15 +0000 Subject: [PATCH] feat: make it hideable --- examples/expo-example/.storybook/preview.tsx | 2 + packages/react-native-ui/src/Layout.tsx | 40 ++++++++++---------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/examples/expo-example/.storybook/preview.tsx b/examples/expo-example/.storybook/preview.tsx index 0ed21ed447..4fcbefda0e 100644 --- a/examples/expo-example/.storybook/preview.tsx +++ b/examples/expo-example/.storybook/preview.tsx @@ -19,6 +19,8 @@ const preview: Preview = { date: /Date$/, }, }, + hideFullScreenButton: false, + noSafeArea: false, my_param: 'anything', backgrounds: { default: Appearance.getColorScheme() === 'dark' ? 'dark' : 'plain', diff --git a/packages/react-native-ui/src/Layout.tsx b/packages/react-native-ui/src/Layout.tsx index fae4a70e04..5d097917e6 100644 --- a/packages/react-native-ui/src/Layout.tsx +++ b/packages/react-native-ui/src/Layout.tsx @@ -146,25 +146,27 @@ export const Layout = ({ {children} - setUiHidden((prev) => !prev)} - > - {uiHidden ? ( - - ) : ( - - )} - + {story.parameters.hideFullScreenButton ? null : ( + setUiHidden((prev) => !prev)} + > + {uiHidden ? ( + + ) : ( + + )} + + )}