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
## 📜 Description
Better coverage of js-doc.
## 💡 Motivation and Context
Current state os JSDoc was in semi-ready state. Some of components had
JSDoc, some props declaration had JSDoc, but some of them wee missing
completely.
I decided to change that, so in this PR I am forcing the JSDoc for each
hook/view/component/props. To assure JSDoc looks consistent across all
files I added `eslint` plugin.
Overall I think it's a great addition - documentation is a key to
success and when you have it on your fingers tip it makes you more
productive 😊
## 📢 Changelog
<!-- High level overview of important changes -->
<!-- For example: fixed status bar manipulation; added new types
declarations; -->
<!-- If your changes don't affect one of platform/language below - then
remove this platform/language -->
### JS
- added eslint plugin to assure documentation is written for each
function and is consistent;
- added missing JSDoc for all public hooks/components/modules.
## 🤔 How Has This Been Tested?
Tested in VSCode.
## 📸 Screenshots (if appropriate):
<img width="933" alt="image"
src="https://github.com/user-attachments/assets/f8e68021-b0d1-4163-a511-ecfd73d10552"
/>
## 📝 Checklist
- [x] CI successfully passed
- [x] I added new mocks and corresponding unit-tests if library API was
changed
* A boolean prop indicating whether the module is enabled. It indicate only initial state,
81
-
* i. e. if you try to change this prop after component mount it will not have any effect.
80
+
* A boolean prop indicating whether the module is enabled. It indicate only initial state
81
+
* (if you try to change this prop after component mount it will not have any effect).
82
82
* To change the property in runtime use `useKeyboardController` hook and `setEnabled` method.
83
83
* Defaults to `true`.
84
84
*/
@@ -89,13 +89,28 @@ type KeyboardProviderProps = {
89
89
// see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details
90
90
constOS=Platform.OS;
91
91
92
-
exportconstKeyboardProvider=({
93
-
children,
94
-
statusBarTranslucent,
95
-
navigationBarTranslucent,
96
-
preserveEdgeToEdge,
97
-
enabled: initiallyEnabled=true,
98
-
}: KeyboardProviderProps)=>{
92
+
/**
93
+
* A component that wrap your app. Under the hood it works with {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-controller-view|KeyboardControllerView} to receive events during keyboard movements,
94
+
* maps these events to `Animated`/`Reanimated` values and store them in context.
95
+
*
96
+
* @param props - Provider props, such as `statusBarTranslucent`, `navigationBarTranslucent`, etc.
97
+
* @returns A component that should be mounted in root of your App layout.
98
+
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-provider|Documentation} page for more details.
* View that moves out of the way when the keyboard appears by automatically
66
-
* adjusting its height, position, or bottom padding.
65
+
* A View component that automatically adjusts its height, position, or bottom padding
66
+
* when the keyboard appears to ensure that the content remains visible.
67
+
*
68
+
* @returns A View component that adjusts to keyboard visibility.
69
+
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/components/keyboard-avoiding-view|Documentation} page for more details.
* The component uses a sophisticated animation system to smoothly handle keyboard transitions
87
+
* and maintain proper scroll position during keyboard interactions.
82
88
*
89
+
* @returns A ScrollView component that handles keyboard interactions.
90
+
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/components/keyboard-aware-scroll-view|Documentation} page for more details.
Copy file name to clipboardExpand all lines: src/components/KeyboardStickyView/index.tsx
+14-1Lines changed: 14 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -20,10 +20,23 @@ export type KeyboardStickyViewProps = {
20
20
opened?: number;
21
21
};
22
22
23
-
/** Controls whether this `KeyboardStickyView` instance should take effect. Default is `true` */
23
+
/** Controls whether this `KeyboardStickyView` instance should take effect. Default is `true`. */
24
24
enabled?: boolean;
25
25
}&ViewProps;
26
26
27
+
/**
28
+
* A View component that sticks to the keyboard and moves with it when it appears or disappears.
29
+
* The view can be configured with custom offsets for both closed and open keyboard states.
30
+
*
31
+
* @returns An animated View component that sticks to the keyboard.
32
+
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/components/keyboard-sticky-view|Documentation} page for more details.
0 commit comments