Skip to content

Commit

Permalink
RNMobile: Fix slider and stepper text inputs in dark mode (#33402)
Browse files Browse the repository at this point in the history
  • Loading branch information
guarani committed Jul 16, 2021
1 parent b66e4c5 commit 9a9e709
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ class RangeTextInput extends Component {
styles.textInputDark
);

const verticalBorderStyle = getStylesFromColorScheme(
styles.verticalBorder,
styles.verticalBorderDark
const textInputIOSStyle = getStylesFromColorScheme(
styles.textInputIOS,
styles.textInputIOSDark
);

const inputBorderStyles = [
Expand All @@ -188,7 +188,10 @@ class RangeTextInput extends Component {
];

const valueFinalStyle = [
! isIOS ? inputBorderStyles : verticalBorderStyle,
Platform.select( {
android: inputBorderStyles,
ios: textInputIOSStyle,
} ),
{
width: 50 * fontScale,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,16 @@

// Range Text Input

.verticalBorder {
.textInputIOS {
border-right-width: 1px;
text-align: center;
border-color: $light-gray-400;
color: $gray-dark;
}

.verticalBorderDark {
.textInputIOSDark {
border-color: $gray-70;
color: $white;
}

.textInputContainer {
Expand Down
3 changes: 3 additions & 0 deletions test/native/__mocks__/styleMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,4 +126,7 @@ module.exports = {
arrow: {
color: 'red',
},
textInput: {
color: 'black',
},
};

0 comments on commit 9a9e709

Please sign in to comment.