Skip to content

Commit

Permalink
fix: TextBox having squished lines
Browse files Browse the repository at this point in the history
  • Loading branch information
Vali-98 committed Nov 21, 2024
1 parent 267e523 commit 1867cf0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/components/TextBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@ const TextBox: React.FC<TextBoxProps> = ({
body,
varname,
setValue,
lines = 0,
lines = undefined,
keyboardType = 'default',
multiline = false,
}) => {
return (
<View style={styles.mainContainer}>
<Text style={styles.title}>{name}</Text>
<TextInput
multiline={lines > 1 || multiline}
multiline={(!!lines && lines > 1) || multiline}
numberOfLines={lines}
style={{
...styles.input,
textAlignVertical: lines > 1 ? `top` : `center`,
textAlignVertical: lines && lines > 1 ? `top` : `center`,
}}
value={body[varname]?.toString() ?? ''}
onChangeText={(value) => {
Expand Down

0 comments on commit 1867cf0

Please sign in to comment.