From a9bee1fb806685dd604c531695a713e5bb27d4a4 Mon Sep 17 00:00:00 2001 From: EthanShoeDev <13422990+EthanShoeDev@users.noreply.github.com> Date: Mon, 22 Sep 2025 15:51:19 -0400 Subject: [PATCH] test screen --- apps/mobile/src/app/(tabs)/_layout.tsx | 1 + apps/mobile/src/app/(test)/_layout.tsx | 34 +++++ apps/mobile/src/app/(test)/index.tsx | 121 ++++++++++++++++++ .../src/app/(test)/rn-keyboard/_layout.tsx | 5 + .../src/app/(test)/rn-keyboard/index.tsx | 121 ++++++++++++++++++ apps/mobile/src/app/index.tsx | 2 +- 6 files changed, 283 insertions(+), 1 deletion(-) create mode 100644 apps/mobile/src/app/(test)/_layout.tsx create mode 100644 apps/mobile/src/app/(test)/index.tsx create mode 100644 apps/mobile/src/app/(test)/rn-keyboard/_layout.tsx create mode 100644 apps/mobile/src/app/(test)/rn-keyboard/index.tsx diff --git a/apps/mobile/src/app/(tabs)/_layout.tsx b/apps/mobile/src/app/(tabs)/_layout.tsx index eebd828..fd0cd6c 100644 --- a/apps/mobile/src/app/(tabs)/_layout.tsx +++ b/apps/mobile/src/app/(tabs)/_layout.tsx @@ -19,6 +19,7 @@ export default function TabsLayout() { // rippleColor={theme.colors.transparent} // ios // blurEffect="systemChromeMaterial" + // disableTransparentOnScrollEdge={true} > diff --git a/apps/mobile/src/app/(test)/_layout.tsx b/apps/mobile/src/app/(test)/_layout.tsx new file mode 100644 index 0000000..c0b0b11 --- /dev/null +++ b/apps/mobile/src/app/(test)/_layout.tsx @@ -0,0 +1,34 @@ +import { Icon, Label, NativeTabs } from 'expo-router/unstable-native-tabs'; +import React from 'react'; +import { useTheme } from '@/lib/theme'; + +export default function TabsLayout() { + const theme = useTheme(); + return ( + + + + + + + ); +} diff --git a/apps/mobile/src/app/(test)/index.tsx b/apps/mobile/src/app/(test)/index.tsx new file mode 100644 index 0000000..c7dc789 --- /dev/null +++ b/apps/mobile/src/app/(test)/index.tsx @@ -0,0 +1,121 @@ +import React, { useCallback, useState } from 'react'; +import { + Text, + View, + StyleSheet, + type TextInputProps, + TextInput, +} from 'react-native'; +import { + KeyboardAvoidingView, + KeyboardToolbar, +} from 'react-native-keyboard-controller'; + +export default function ToolbarExample() { + return ( + <> + + + + + + + + + + ); +} + +type CustomTextInputProps = { + title?: string; +} & TextInputProps; + +const TextInputAndLabel = (props: CustomTextInputProps) => { + const { title, ...rest } = props; + const [isFocused, setFocused] = useState(false); + + const onFocus = useCallback>((e) => { + setFocused(true); + props.onFocus?.(e); + }, []); + + const onBlur = useCallback>((e) => { + setFocused(false); + props.onBlur?.(e); + }, []); + + return ( + <> + {!!title && {title}} + + + ); +}; + +const textInputStyles = StyleSheet.create({ + title: { + marginBottom: 6, + marginLeft: 3, + color: 'black', + fontSize: 16, + }, + container: { + width: '100%', + minHeight: 50, + maxHeight: 200, + borderColor: 'black', + borderWidth: 2, + marginRight: 160, + borderRadius: 10, + color: 'black', + paddingHorizontal: 12, + }, + disabled: { + opacity: 0.5, + }, + focused: { + borderColor: '#20AAFF', + }, +}); diff --git a/apps/mobile/src/app/(test)/rn-keyboard/_layout.tsx b/apps/mobile/src/app/(test)/rn-keyboard/_layout.tsx new file mode 100644 index 0000000..6459bc8 --- /dev/null +++ b/apps/mobile/src/app/(test)/rn-keyboard/_layout.tsx @@ -0,0 +1,5 @@ +import { Stack } from 'expo-router'; + +export default function Layout() { + return ; +} diff --git a/apps/mobile/src/app/(test)/rn-keyboard/index.tsx b/apps/mobile/src/app/(test)/rn-keyboard/index.tsx new file mode 100644 index 0000000..2ad7d97 --- /dev/null +++ b/apps/mobile/src/app/(test)/rn-keyboard/index.tsx @@ -0,0 +1,121 @@ +import React, { useCallback, useState } from 'react'; +import { + Text, + View, + StyleSheet, + type TextInputProps, + TextInput, +} from 'react-native'; +import { + KeyboardAvoidingView, + KeyboardToolbar, +} from 'react-native-keyboard-controller'; + +export default function ToolbarExample() { + return ( + <> + + + + + + + + + + ); +} + +type CustomTextInputProps = { + title?: string; +} & TextInputProps; + +const TextInputAndLabel = (props: CustomTextInputProps) => { + const { title, ...rest } = props; + const [isFocused, setFocused] = useState(false); + + const onFocus = useCallback>((e) => { + setFocused(true); + props.onFocus?.(e); + }, []); + + const onBlur = useCallback>((e) => { + setFocused(false); + props.onBlur?.(e); + }, []); + + return ( + <> + {!!title && {title}} + + + ); +}; + +const textInputStyles = StyleSheet.create({ + title: { + marginBottom: 6, + marginLeft: 3, + color: 'black', + fontSize: 16, + }, + container: { + width: '100%', + minHeight: 50, + maxHeight: 200, + borderColor: 'black', + borderWidth: 2, + marginRight: 160, + borderRadius: 10, + color: 'black', + paddingHorizontal: 12, + }, + disabled: { + opacity: 0.5, + }, + focused: { + borderColor: '#20AAFF', + }, +}); diff --git a/apps/mobile/src/app/index.tsx b/apps/mobile/src/app/index.tsx index d197633..7d618d5 100644 --- a/apps/mobile/src/app/index.tsx +++ b/apps/mobile/src/app/index.tsx @@ -1,5 +1,5 @@ import { Redirect } from 'expo-router'; export default function RootRedirect() { - return ; + return ; }