Skip to content

Commit 52fc118

Browse files
committed
chore(docs): sync docs for keyboard handling
1 parent e82eba4 commit 52fc118

File tree

3 files changed

+53
-41
lines changed

3 files changed

+53
-41
lines changed

docs/src/content/docs/ui-and-theme/Forms.mdx

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -106,19 +106,14 @@ Any Component with props that inherit from the `InputControllerType` can be used
106106

107107
## Handling Keyboard
108108

109-
The template comes with [`react-native-avoid-softinput`](https://mateusz1913.github.io/react-native-avoid-softinput/) pre-installed and configured to handle the keyboard. You only need to use the `useSoftKeyboardEffect` hook on your screen, and you're good to go.
109+
The template comes with [`react-native-keyboard-controller`](https://kirillzyusko.github.io/react-native-keyboard-controller/) pre-installed and configured to handle the keyboard. You only need to check the [documentation](https://kirillzyusko.github.io/react-native-keyboard-controller/) and use the appropriate approach for your use case. ( note that we already added the `KeyboardProvider` to the layout in the root file)
110110

111-
```tsx
112-
import React from 'react';
113-
import { useSoftKeyboardEffect } from '@/core/keyboard';
114-
import { LoginForm } from './login-form';
115-
116-
export const Login = () => {
117-
useSoftKeyboardEffect();
118-
return <LoginForm />;
119-
};
120-
```
111+
Make sure to check the following video for more details on how to handle keyboard in react native:
121112

122-
:::tip
123-
Note that the hook is not an all-in-one solution for all cases, and you might need more customization depending on your use case. So, please refer to the documentation [recipes pages](https://mateusz1913.github.io/react-native-avoid-softinput/docs/recipes/recipes-form) for more information.
124-
:::
113+
<div class="embed-container">
114+
<iframe
115+
src="https://www.youtube.com/embed/Y51mDfAhd4E?si=8uPml61z0R1hsZGy&amp;start=1139"
116+
frameborder="0"
117+
allowfullscreen
118+
></iframe>
119+
</div>

docs/src/styles/custom.css

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,20 @@
8080
font-weight: 600;
8181
line-height: 1.2;
8282
}
83+
84+
.embed-container {
85+
position: relative;
86+
padding-bottom: 56.25%;
87+
height: 0;
88+
overflow: hidden;
89+
max-width: 100%;
90+
}
91+
.embed-container iframe,
92+
.embed-container object,
93+
.embed-container embed {
94+
position: absolute;
95+
top: 0;
96+
left: 0;
97+
width: 100%;
98+
height: 100%;
99+
}

ios/ObytesApp.xcodeproj/project.pbxproj

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,32 +11,32 @@
1111
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1212
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1313
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */; };
14-
5D8F3C2362D24F619EDCDE00 /* Inter.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 37D90FF4F0EA44F3B61B1F18 /* Inter.ttf */; };
14+
5DEE9AD32DCD47D68FD42A99 /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6DBAFBDC60F343BE83F90CAD /* noop-file.swift */; };
15+
809B8466ECD71EDCCA015B39 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 03450B6B24E8ADB6474F38C2 /* PrivacyInfo.xcprivacy */; };
1516
96905EF65AED1B983A6B3ABC /* libPods-ObytesApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 58EEBF8E8E6FB1BC6CAF49B5 /* libPods-ObytesApp.a */; };
17+
AA610EAADB7D40C9B3325C01 /* Inter.ttf in Resources */ = {isa = PBXBuildFile; fileRef = E357828797354C4B9E31143F /* Inter.ttf */; };
1618
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */; };
17-
BA27675D81B61B7B831BBB16 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 08A38DF0972D84B2ABA37617 /* PrivacyInfo.xcprivacy */; };
1819
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */ = {isa = PBXBuildFile; fileRef = BB2F792C24A3F905000567C9 /* Expo.plist */; };
19-
DF1CA3A894994D478C7276ED /* noop-file.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4968435ABAD420FA1E63F07 /* noop-file.swift */; };
2020
/* End PBXBuildFile section */
2121

2222
/* Begin PBXFileReference section */
23-
08A38DF0972D84B2ABA37617 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = ObytesApp/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
23+
03450B6B24E8ADB6474F38C2 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; name = PrivacyInfo.xcprivacy; path = ObytesApp/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
2424
13B07F961A680F5B00A75B9A /* ObytesApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ObytesApp.app; sourceTree = BUILT_PRODUCTS_DIR; };
2525
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ObytesApp/AppDelegate.h; sourceTree = "<group>"; };
2626
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = ObytesApp/AppDelegate.mm; sourceTree = "<group>"; };
2727
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = ObytesApp/Images.xcassets; sourceTree = "<group>"; };
2828
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ObytesApp/Info.plist; sourceTree = "<group>"; };
2929
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ObytesApp/main.m; sourceTree = "<group>"; };
30-
37D90FF4F0EA44F3B61B1F18 /* Inter.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Inter.ttf; path = ../assets/fonts/Inter.ttf; sourceTree = "<group>"; };
3130
58EEBF8E8E6FB1BC6CAF49B5 /* libPods-ObytesApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ObytesApp.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3231
6C2E3173556A471DD304B334 /* Pods-ObytesApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObytesApp.debug.xcconfig"; path = "Target Support Files/Pods-ObytesApp/Pods-ObytesApp.debug.xcconfig"; sourceTree = "<group>"; };
32+
6DBAFBDC60F343BE83F90CAD /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "ObytesApp/noop-file.swift"; sourceTree = "<group>"; };
3333
7A4D352CD337FB3A3BF06240 /* Pods-ObytesApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ObytesApp.release.xcconfig"; path = "Target Support Files/Pods-ObytesApp/Pods-ObytesApp.release.xcconfig"; sourceTree = "<group>"; };
3434
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = SplashScreen.storyboard; path = ObytesApp/SplashScreen.storyboard; sourceTree = "<group>"; };
3535
BB2F792C24A3F905000567C9 /* Expo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Expo.plist; sourceTree = "<group>"; };
36+
C2E15444E35243018156F414 /* ObytesApp-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "ObytesApp-Bridging-Header.h"; path = "ObytesApp/ObytesApp-Bridging-Header.h"; sourceTree = "<group>"; };
37+
E357828797354C4B9E31143F /* Inter.ttf */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = undefined; includeInIndex = 0; lastKnownFileType = unknown; name = Inter.ttf; path = ../assets/fonts/Inter.ttf; sourceTree = "<group>"; };
3638
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
37-
F4968435ABAD420FA1E63F07 /* noop-file.swift */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.swift; name = "noop-file.swift"; path = "ObytesApp/noop-file.swift"; sourceTree = "<group>"; };
3839
FAC715A2D49A985799AEE119 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-ObytesApp/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
39-
FDC76194471C440085A95A27 /* ObytesApp-Bridging-Header.h */ = {isa = PBXFileReference; explicitFileType = undefined; fileEncoding = 4; includeInIndex = 0; lastKnownFileType = sourcecode.c.h; name = "ObytesApp-Bridging-Header.h"; path = "ObytesApp/ObytesApp-Bridging-Header.h"; sourceTree = "<group>"; };
4040
/* End PBXFileReference section */
4141

4242
/* Begin PBXFrameworksBuildPhase section */
@@ -61,9 +61,9 @@
6161
13B07FB61A68108700A75B9A /* Info.plist */,
6262
13B07FB71A68108700A75B9A /* main.m */,
6363
AA286B85B6C04FC6940260E9 /* SplashScreen.storyboard */,
64-
F4968435ABAD420FA1E63F07 /* noop-file.swift */,
65-
FDC76194471C440085A95A27 /* ObytesApp-Bridging-Header.h */,
66-
08A38DF0972D84B2ABA37617 /* PrivacyInfo.xcprivacy */,
64+
6DBAFBDC60F343BE83F90CAD /* noop-file.swift */,
65+
C2E15444E35243018156F414 /* ObytesApp-Bridging-Header.h */,
66+
03450B6B24E8ADB6474F38C2 /* PrivacyInfo.xcprivacy */,
6767
);
6868
name = ObytesApp;
6969
sourceTree = "<group>";
@@ -77,15 +77,6 @@
7777
name = Frameworks;
7878
sourceTree = "<group>";
7979
};
80-
3A823E08E8F0485E8582F6B7 /* Resources */ = {
81-
isa = PBXGroup;
82-
children = (
83-
37D90FF4F0EA44F3B61B1F18 /* Inter.ttf */,
84-
);
85-
name = Resources;
86-
path = "";
87-
sourceTree = "<group>";
88-
};
8980
832341AE1AAA6A7D00B99B32 /* Libraries */ = {
9081
isa = PBXGroup;
9182
children = (
@@ -102,7 +93,7 @@
10293
2D16E6871FA4F8E400B85C8A /* Frameworks */,
10394
D65327D7A22EEC0BE12398D9 /* Pods */,
10495
D7E4C46ADA2E9064B798F356 /* ExpoModulesProviders */,
105-
3A823E08E8F0485E8582F6B7 /* Resources */,
96+
E79D610B7FF24EF7B47521FE /* Resources */,
10697
);
10798
indentWidth = 2;
10899
sourceTree = "<group>";
@@ -151,6 +142,15 @@
151142
name = ExpoModulesProviders;
152143
sourceTree = "<group>";
153144
};
145+
E79D610B7FF24EF7B47521FE /* Resources */ = {
146+
isa = PBXGroup;
147+
children = (
148+
E357828797354C4B9E31143F /* Inter.ttf */,
149+
);
150+
name = Resources;
151+
path = "";
152+
sourceTree = "<group>";
153+
};
154154
/* End PBXGroup section */
155155

156156
/* Begin PBXNativeTarget section */
@@ -159,13 +159,13 @@
159159
buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "ObytesApp" */;
160160
buildPhases = (
161161
08A4A3CD28434E44B6B9DE2E /* [CP] Check Pods Manifest.lock */,
162-
9B074ED8B4BA47D9FE537166 /* [Expo] Configure project */,
162+
F7F1A92E9D4CF89AF6423405 /* [Expo] Configure project */,
163163
13B07F871A680F5B00A75B9A /* Sources */,
164164
13B07F8C1A680F5B00A75B9A /* Frameworks */,
165165
13B07F8E1A680F5B00A75B9A /* Resources */,
166166
00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */,
167167
800E24972A6A228C8D4807E9 /* [CP] Copy Pods Resources */,
168-
89E010EA0719900D8814EFBA /* [CP] Embed Pods Frameworks */,
168+
C90A9FDFCC2EDCCB59D19AE6 /* [CP] Embed Pods Frameworks */,
169169
);
170170
buildRules = (
171171
);
@@ -215,8 +215,8 @@
215215
BB2F792D24A3F905000567C9 /* Expo.plist in Resources */,
216216
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
217217
3E461D99554A48A4959DE609 /* SplashScreen.storyboard in Resources */,
218-
5D8F3C2362D24F619EDCDE00 /* Inter.ttf in Resources */,
219-
BA27675D81B61B7B831BBB16 /* PrivacyInfo.xcprivacy in Resources */,
218+
AA610EAADB7D40C9B3325C01 /* Inter.ttf in Resources */,
219+
809B8466ECD71EDCCA015B39 /* PrivacyInfo.xcprivacy in Resources */,
220220
);
221221
runOnlyForDeploymentPostprocessing = 0;
222222
};
@@ -294,7 +294,7 @@
294294
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ObytesApp/Pods-ObytesApp-resources.sh\"\n";
295295
showEnvVarsInLog = 0;
296296
};
297-
89E010EA0719900D8814EFBA /* [CP] Embed Pods Frameworks */ = {
297+
C90A9FDFCC2EDCCB59D19AE6 /* [CP] Embed Pods Frameworks */ = {
298298
isa = PBXShellScriptBuildPhase;
299299
buildActionMask = 2147483647;
300300
files = (
@@ -312,7 +312,7 @@
312312
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ObytesApp/Pods-ObytesApp-frameworks.sh\"\n";
313313
showEnvVarsInLog = 0;
314314
};
315-
9B074ED8B4BA47D9FE537166 /* [Expo] Configure project */ = {
315+
F7F1A92E9D4CF89AF6423405 /* [Expo] Configure project */ = {
316316
isa = PBXShellScriptBuildPhase;
317317
alwaysOutOfDate = 1;
318318
buildActionMask = 2147483647;
@@ -341,7 +341,7 @@
341341
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
342342
13B07FC11A68108700A75B9A /* main.m in Sources */,
343343
B18059E884C0ABDD17F3DC3D /* ExpoModulesProvider.swift in Sources */,
344-
DF1CA3A894994D478C7276ED /* noop-file.swift in Sources */,
344+
5DEE9AD32DCD47D68FD42A99 /* noop-file.swift in Sources */,
345345
);
346346
runOnlyForDeploymentPostprocessing = 0;
347347
};

0 commit comments

Comments
 (0)