Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change style for TextInput area #5704

Merged
merged 6 commits into from
Oct 12, 2021
Merged
Show file tree
Hide file tree
Changes from 5 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
3 changes: 1 addition & 2 deletions src/components/ExpensiTextInput/BaseExpensiTextInput.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ class BaseExpensiTextInput extends Component {
<View
style={[
styles.expensiTextInputContainer,
!hasLabel && styles.pv0,
this.state.isFocused && styles.borderColorFocus,
(hasError || errorText) && styles.borderColorDanger,
]}
Expand Down Expand Up @@ -194,7 +193,7 @@ class BaseExpensiTextInput extends Component {
placeholder={(this.state.isFocused || !label) ? placeholder : null}
placeholderTextColor={themeColors.placeholderText}
underlineColorAndroid="transparent"
style={inputStyle}
style={[inputStyle, !hasLabel && styles.pv0]}
multiline={multiline}
onFocus={this.onFocus}
onBlur={this.onBlur}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ const ExpensiTextInputLabel = ({
labelScale,
),
]}
selectable={false}
>
{label}
</Animated.Text>
Expand Down
7 changes: 4 additions & 3 deletions src/styles/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -485,9 +485,6 @@ const styles = {
borderWidth: 1,
borderRadius: variables.componentBorderRadiusNormal,
borderColor: themeColors.border,
paddingTop: 25,
paddingBottom: 8,
paddingHorizontal: 12,
justifyContent: 'center',
height: '100%',
backgroundColor: themeColors.componentBG,
Expand All @@ -500,6 +497,7 @@ const styles = {
color: themeColors.textSupporting,
fontFamily: fontFamily.GTA,
width: '100%',
zIndex: -1,
},
expensiTextInputLabelDesktop: {
transformOrigin: 'left center',
Expand All @@ -516,6 +514,9 @@ const styles = {
fontSize: variables.fontSizeNormal,
color: themeColors.text,
...spacing.pv0,
paddingTop: 25,
paddingBottom: 8,
paddingHorizontal: 12,
},
expensiTextInputDesktop: addOutlineWidth({}, 0),
expensiTextInputAndroid: left => ({
Expand Down