Skip to content

Commit 26c8470

Browse files
authored
Merge pull request #4649 from studio-504/expensitextinput-multiline
Multiline for ExpensiTextInput
2 parents eb73fd3 + 010ee41 commit 26c8470

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/components/ExpensiTextInput/BaseExpensiTextInput.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,19 @@ class BaseExpensiTextInput extends Component {
120120
ignoreLabelTranslateX,
121121
innerRef,
122122
autoFocus,
123+
multiline,
123124
...inputProps
124125
} = this.props;
125126

126127
const hasLabel = Boolean(label.length);
127128
return (
128129
<View>
129-
<View style={[styles.componentHeightLarge, ...containerStyles]}>
130+
<View
131+
style={[
132+
!multiline && styles.componentHeightLarge,
133+
...containerStyles,
134+
]}
135+
>
130136
<TouchableWithoutFeedback onPress={() => this.input.focus()} focusable={false}>
131137
<View
132138
style={[
@@ -160,6 +166,7 @@ class BaseExpensiTextInput extends Component {
160166
placeholderTextColor={themeColors.placeholderText}
161167
underlineColorAndroid="transparent"
162168
style={[...inputStyle, errorText ? styles.errorOutline : undefined]}
169+
multiline={multiline}
163170
onFocus={this.onFocus}
164171
onBlur={this.onBlur}
165172
onChangeText={this.setValue}

src/pages/workspace/WorkspaceInvitePage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class WorkspaceInvitePage extends React.Component {
5252

5353
this.state = {
5454
userLogins: '',
55-
welcomeNote: '',
55+
welcomeNote: this.getWelcomeNotePlaceholder(),
5656
};
5757

5858
this.focusEmailOrPhoneInput = this.focusEmailOrPhoneInput.bind(this);
@@ -128,7 +128,7 @@ class WorkspaceInvitePage extends React.Component {
128128
label={this.props.translate('workspace.invite.personalMessagePrompt')}
129129
autoCompleteType="off"
130130
autoCorrect={false}
131-
numberOfLines={10}
131+
numberOfLines={5}
132132
textAlignVertical="top"
133133
multiline
134134
value={this.state.welcomeNote}

src/styles/styles.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,8 @@ const styles = {
542542
expensiTextInput: {
543543
fontFamily: fontFamily.GTA,
544544
fontSize: variables.fontSizeNormal,
545+
color: themeColors.text,
546+
...spacing.pv0,
545547
},
546548
expensiTextInputDesktop: addOutlineWidth({}, 0),
547549
expensiTextInputAndroid: left => ({

0 commit comments

Comments
 (0)