Skip to content

Commit 3bdfa77

Browse files
committed
Fix Multiline input and remove unnecessary packages
1 parent bccd1a2 commit 3bdfa77

File tree

5 files changed

+16
-27
lines changed

5 files changed

+16
-27
lines changed

bun.lockb

-7.35 KB
Binary file not shown.

package.json

-3
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
"prettier:fix": "prettier --write ."
2020
},
2121
"dependencies": {
22-
"@expensify/react-native-live-markdown": "^0.1.219",
2322
"@react-native-clipboard/clipboard": "^1.16.1",
2423
"@react-native-community/netinfo": "^11.4.1",
2524
"@react-native-masked-view/masked-view": "^0.3.2",
@@ -29,9 +28,7 @@
2928
"@shopify/react-native-skia": "^1.10.2",
3029
"@tanstack/react-query": "^5.64.1",
3130
"clsx": "^2.1.1",
32-
"expensify-common": "^2.0.114",
3331
"hono": "^4.6.16",
34-
"html-entities": "^2.5.2",
3532
"lottie-react-native": "^7.2.1",
3633
"nativewind": "^4.1.23",
3734
"react": "18.3.1",

src/components/Input.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Colors } from '@utils/colors'
2-
import { F, SEMIBOLD } from '@utils/fonts'
2+
import { SEMIBOLD } from '@utils/fonts'
33
import { cn } from '@utils/utils'
44
import React from 'react'
55
import { TextInput, View, useColorScheme, type TextInputProps } from 'react-native'
@@ -16,8 +16,8 @@ export function Input({ Icon, Right, accent = Colors.accent, multiline, classNam
1616
<View className='flex-1 flex-row items-center' style={{ gap: 22 }}>
1717
{Icon}
1818
<TextInput
19-
className={cn('flex-1 px-0 py-3 text-zinc-800 dark:text-zinc-200', className)}
20-
style={[{ marginBottom: 1, paddingVertical: 0, flex: 1 }, F.F12_5, SEMIBOLD]}
19+
className={cn('flex-1 text-zinc-800 dark:text-zinc-200', className)}
20+
style={[{ marginBottom: 1, flex: 1, height: multiline ? undefined : 40, fontSize: 12.5 }, SEMIBOLD]}
2121
placeholderTextColor={scheme === 'dark' ? Colors.zinc[500] : Colors.zinc[400]}
2222
cursorColor={accent}
2323
selectionColor={accent + '77'}

src/screens/Test.tsx

+11-19
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,20 @@
1+
import { Input } from '@components/Input'
2+
import SettGroup from '@components/Settings/SettGroup'
3+
import SettText from '@components/Settings/SettText'
14
import SettWrapper from '@components/Settings/SettWrapper'
2-
import { MarkdownTextInput, parseExpensiMark } from '@expensify/react-native-live-markdown'
3-
import { Colors } from '@utils/colors'
4-
import { H } from '@utils/dimensions'
5-
import { MEDIUM } from '@utils/fonts'
65
import type { NavProp } from '@utils/types'
7-
import { useState } from 'react'
86

97
export default function Test({ navigation }: NavProp) {
10-
const [text, setText] = useState('')
118
return (
129
<>
13-
<SettWrapper navigation={navigation} title='Test Markdown' className='px-2'>
14-
<MarkdownTextInput
15-
value={text}
16-
onChangeText={setText}
17-
keyboardType='twitter'
18-
className='text'
19-
parser={parseExpensiMark}
20-
numberOfLines={100}
21-
style={{ ...MEDIUM, flex: 1, textAlignVertical: 'top', height: H - 100 }}
22-
selectionColor={Colors.accent + '77'}
23-
cursorColor={Colors.accent}
24-
multiline
25-
/>
10+
<SettWrapper navigation={navigation} title='Test Screen'>
11+
<SettText className='mt-5'>This is a test screen</SettText>
12+
<SettGroup title='Normal Input'>
13+
<Input placeholder='Test Input' />
14+
</SettGroup>
15+
<SettGroup title='Multiline Input (8)'>
16+
<Input multiline placeholder='Test Input' numberOfLines={8} />
17+
</SettGroup>
2618
</SettWrapper>
2719
</>
2820
)

src/screens/auth/Login.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default function Login({ navigation }: NavProp) {
8989
<Lottie source={Animations['welcome']} style={{ width: W * 0.6, height: W * 0.6 }} />
9090
</View>
9191
<Gap12>
92-
<SettGroup title='Enter your credentials'>
92+
<SettGroup title='Email or Username'>
9393
<Input
9494
Icon={<RoundedIcon Icon={Mail02SolidIcon} className='bg-rose-500' />}
9595
autoComplete='email'
@@ -98,7 +98,7 @@ export default function Login({ navigation }: NavProp) {
9898
onChangeText={setUsername}
9999
/>
100100
</SettGroup>
101-
<SettGroup title='Enter your password'>
101+
<SettGroup title='Your password'>
102102
<Input
103103
value={password}
104104
autoComplete='password'

0 commit comments

Comments
 (0)