Skip to content
This repository has been archived by the owner on Oct 4, 2023. It is now read-only.

Fix TextField input spacing #3978

Merged
merged 1 commit into from
Aug 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions packages/mobile/src/components/core/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,7 @@ const useStyles = makeStyles(({ typography, palette, spacing }) => ({
color: palette.neutralLight7
},
startAdornment: {},
endAdornment: {
alignSelf: 'flex-end'
},
endAdornment: {},
inputAccessory: {
flexDirection: 'row',
justifyContent: 'flex-end'
Expand Down
9 changes: 6 additions & 3 deletions packages/mobile/src/components/fields/TextField.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useField } from 'formik'
import { capitalize } from 'lodash'
import { View } from 'react-native'
import { Platform, View } from 'react-native'

import type { TextInputProps } from 'app/components/core'
import { TextInput, InputErrorMessage } from 'app/components/core'
Expand All @@ -18,7 +18,9 @@ const useStyles = makeStyles(({ spacing, typography }) => ({
label: { marginBottom: spacing(2) },
input: {
fontSize: typography.fontSize.large,
fontFamily: typography.fontByWeight.demiBold
fontFamily: typography.fontByWeight.demiBold,
lineHeight:
Platform.OS === 'ios' ? typography.fontSize.xl : typography.fontSize.large
},
labelText: {
fontSize: typography.fontSize.large,
Expand All @@ -33,6 +35,7 @@ export const TextField = (props: TextFieldProps) => {
label: labelProp,
required,
errorMessage: errorMessageProp,
style,
styles: stylesProp,
...other
} = props
Expand All @@ -44,7 +47,7 @@ export const TextField = (props: TextFieldProps) => {
errorMessageProp || (error ? `${capitalize(name)} ${error}` : undefined)

return (
<View style={styles.root}>
<View style={[styles.root, style]}>
<TextInput
label={label}
styles={{
Expand Down