You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(scroll-to-hide): add resetPosition function to ScrollToHideProvider
Add resetPosition function to reset scroll position with animation
Update documentation to reflect package name changes and new feature
Bump rnc-theme version to 0.1.1
Copy file name to clipboardExpand all lines: apps/docs/src/content/docs/hooks/use-scroll-to-hide.mdx
+12-28Lines changed: 12 additions & 28 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@ The `ScrollToHideProvider` is automatically integrated into the `RNCProvider`. Y
19
19
20
20
### Basic Usage
21
21
22
-
<Codecode={`import { RNCProvider } from 'your-package';
22
+
<Codecode={`import { RNCProvider } from 'rnc-theme';
23
23
24
24
function App() {
25
25
return (
@@ -34,26 +34,6 @@ function App() {
34
34
);
35
35
}`}lang="tsx"title="App.tsx" />
36
36
37
-
### Standalone Usage (Not Recommended)
38
-
39
-
If you need to use `ScrollToHideProvider` outside of `RNCProvider`, you can import it directly:
40
-
41
-
<Codecode={`import { ScrollToHideProvider } from 'your-package/contexts/ScrollToHideProvider';
42
-
43
-
function StandaloneApp() {
44
-
return (
45
-
<ScrollToHideProvider
46
-
headerHeight={100}
47
-
tabBarHeight={60}
48
-
>
49
-
<YourScreenContent />
50
-
</ScrollToHideProvider>
51
-
);
52
-
}`}lang="tsx"title="StandaloneApp.tsx" />
53
-
54
-
<Asidetype="caution"title="Not Recommended">
55
-
Using `ScrollToHideProvider` standalone means you'll miss out on theme integration and other RNCProvider features. Always prefer using it through `RNCProvider` with `scrollToHideProps`.
56
-
</Aside>
57
37
58
38
### Props
59
39
@@ -123,11 +103,15 @@ The main hook for accessing scroll-to-hide functionality and animated values.
0 commit comments