about summary refs log tree commit diff
path: root/src/components/KeyboardControllerPadding.android.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/KeyboardControllerPadding.android.tsx')
-rw-r--r--src/components/KeyboardControllerPadding.android.tsx31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/components/KeyboardControllerPadding.android.tsx b/src/components/KeyboardControllerPadding.android.tsx
deleted file mode 100644
index 92ef1b0b0..000000000
--- a/src/components/KeyboardControllerPadding.android.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import React from 'react'
-import {useKeyboardHandler} from 'react-native-keyboard-controller'
-import Animated, {
-  useAnimatedStyle,
-  useSharedValue,
-} from 'react-native-reanimated'
-
-export function KeyboardControllerPadding({maxHeight}: {maxHeight?: number}) {
-  const keyboardHeight = useSharedValue(0)
-
-  useKeyboardHandler(
-    {
-      onMove: e => {
-        'worklet'
-
-        if (maxHeight && e.height > maxHeight) {
-          keyboardHeight.value = maxHeight
-        } else {
-          keyboardHeight.value = e.height
-        }
-      },
-    },
-    [maxHeight],
-  )
-
-  const animatedStyle = useAnimatedStyle(() => ({
-    height: keyboardHeight.value,
-  }))
-
-  return <Animated.View style={animatedStyle} />
-}