fix(mobile): keyboard-avoidance i Screen så formulär inte göms bakom tangentbordet (FAS 35)
CI / Typecheck, test & build (push) Successful in 1m40s

This commit is contained in:
Sven (AAMOS AI)
2026-08-14 04:01:44 +07:00
parent e3d50707e8
commit 5f9526cb07
5 changed files with 15 additions and 7 deletions
+9 -1
View File
@@ -1,6 +1,8 @@
import type { PropsWithChildren, ReactNode } from "react";
import {
ActivityIndicator,
KeyboardAvoidingView,
Platform,
Pressable,
ScrollView,
StyleSheet,
@@ -25,6 +27,7 @@ export function Screen({
<ScrollView
contentContainerStyle={[styles.screenContent, style]}
keyboardShouldPersistTaps="handled"
keyboardDismissMode="on-drag"
>
{children}
</ScrollView>
@@ -33,7 +36,12 @@ export function Screen({
);
return (
<SafeAreaView style={styles.screen} edges={["top"]}>
{content}
<KeyboardAvoidingView
style={{ flex: 1 }}
behavior={Platform.OS === "ios" ? "padding" : undefined}
>
{content}
</KeyboardAvoidingView>
</SafeAreaView>
);
}