Download examples/bluetooth/react-native/src/components/keyboardLayout.ts from Anirudh1950/MentraOS: direct link, hf CLI and curl.
- Browser
- Download file 414 Bytes
-
https://huggingface.co/Anirudh1950/MentraOS/resolve/main/examples/bluetooth/react-native/src/components/keyboardLayout.ts
- Command line
-
hf download hf://Anirudh1950/MentraOS/examples/bluetooth/react-native/src/components/keyboardLayout.ts
-
curl -L -o keyboardLayout.ts https://huggingface.co/Anirudh1950/MentraOS/resolve/main/examples/bluetooth/react-native/src/components/keyboardLayout.ts
414 Bytes
| import { createContext, useContext } from 'react'; | |
| const TAB_BAR_SCROLL_PADDING = 140; | |
| const KEYBOARD_SCROLL_PADDING = 24; | |
| export const KeyboardVisibleContext = createContext(false); | |
| export function useKeyboardVisible() { | |
| return useContext(KeyboardVisibleContext); | |
| } | |
| export function useScrollBottomPadding() { | |
| return useKeyboardVisible() ? KEYBOARD_SCROLL_PADDING : TAB_BAR_SCROLL_PADDING; | |
| } | |