diff --git a/website/docs/getting-started.mdx b/website/docs/getting-started.mdx index 79b7a49b2..61c13aaf4 100644 --- a/website/docs/getting-started.mdx +++ b/website/docs/getting-started.mdx @@ -57,7 +57,7 @@ This library provides two versions that are align with `Reanimated v1 & v2` This version is written with `Reanimated v1` & compatible with `Reanimated v2`: ```bash -yarn add @gorhom/bottom-sheet@2.0.0 +yarn add @gorhom/bottom-sheet@^2 ``` #### Dependencies @@ -79,7 +79,7 @@ yarn add react-native-reanimated react-native-gesture-handler This version is written with `Reanimated v2` and **CAN NOT RUN** with `Reanimated v1`: ```bash -yarn add @gorhom/bottom-sheet +yarn add @gorhom/bottom-sheet@^3 ``` #### Dependencies diff --git a/website/docs/hooks.md b/website/docs/hooks.md index 039e8959f..1db699eee 100644 --- a/website/docs/hooks.md +++ b/website/docs/hooks.md @@ -12,7 +12,7 @@ This hook provides all the bottom sheet public [methods](methods), to the intern > This hook works at any component in `BottomSheet`. ```tsx -import { useBottomSheet} from '@gorhom/bottom-sheet'; +import { useBottomSheet } from '@gorhom/bottom-sheet'; const SheetContent = () => { const { expand } = useBottomSheet(); @@ -24,3 +24,59 @@ const SheetContent = () => { ) } ``` + +## `useBottomSheetSpringConfigs` + +**`Available only on v3, for now.`** + +Generate animation spring configs. + +```tsx +import BottomSheet, { useBottomSheetSpringConfigs } from '@gorhom/bottom-sheet'; + +const SheetContent = () => { + + const animationConfigs = useBottomSheetSpringConfigs({ + damping: 80, + overshootClamping: true, + restDisplacementThreshold: 0.1, + restSpeedThreshold: 0.1, + stiffness: 500, + }); + + return ( + + {CONTENT HERE} + + ) +} +``` + +## `useBottomSheetSpringConfigs` + +**`Available only on v3, for now.`** + +Generate animation timing configs. + +```tsx +import BottomSheet, { useBottomSheetTimingConfigs } from '@gorhom/bottom-sheet'; +import { Easing } from 'react-native-reanimated'; + +const SheetContent = () => { + + const animationConfigs = useBottomSheetTimingConfigs({ + duration: 250, + easing: Easing.exp, + }); + + return ( + + {CONTENT HERE} + + ) +} +``` diff --git a/website/docs/modal/hooks.md b/website/docs/modal/hooks.md index 1dae95f77..a4bdbf56f 100644 --- a/website/docs/modal/hooks.md +++ b/website/docs/modal/hooks.md @@ -19,7 +19,7 @@ const SheetContent = () => { return ( -