From 8c4304aa9dfa2b47e5c43f51b4c70c779706f487 Mon Sep 17 00:00:00 2001 From: Rajat Chaudhary Date: Tue, 20 Aug 2024 19:23:40 +0530 Subject: [PATCH] fix: added note of snapPoints for select and actionsheet components --- .../src/components/Actionsheet/index.nw.stories.mdx | 2 ++ .../src/components/Select/index.nw.stories.mdx | 2 ++ 2 files changed, 4 insertions(+) diff --git a/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx index 1c20ee6e1..e3677ac1e 100644 --- a/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Actionsheet/index.nw.stories.mdx @@ -440,6 +440,8 @@ It inherits all the properties of React Native's [View](https://reactnative.dev/ +> Note: If **snapPoints** are not provided to `Actionsheet`, then it's essential to set **maxHeight** to `ActionsheetContent`. + #### ActionsheetBackdrop It is React Native's [Pressable](https://reactnative.dev/docs/pressable) component, created using [@legendapp/motion's](https://legendapp.com/open-source/motion/) `createMotionAnimatedComponent` function to add animation to the component. You can use any declarative animation library you prefer. diff --git a/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx b/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx index ddf021c4f..5b16f1764 100644 --- a/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx +++ b/example/storybook-nativewind/src/components/Select/index.nw.stories.mdx @@ -461,6 +461,8 @@ It inherits all the properties of React Native's [Pressable](https://reactnative It is internally mapped wth gluestack-ui's [Actionsheet](/ui/docs/components/disclosure/actionsheet) component, which inherits all the properties of React Native's [View](https://reactnative.dev/docs/view) component. +> Note: If **snapPoints** are not provided to `SelectPortal`, then it's essential to set **maxHeight** to `SelectContent`. + #### SelectBackdrop It is internally mapped wth gluestack-ui's [ActionsheetBackdrop](https://ui.gluestack.io/docs/components/disclosure/actionsheet) component, which is React Native's [Pressable](https://reactnative.dev/docs/pressable) component, created using [@legendapp/motion's](https://legendapp.com/open-source/motion/) `createMotionAnimatedComponent` function to add animation to the component. You can use any declarative animation library you prefer.