Skip to content

Commit 7d32ff6

Browse files
Sankhadeep RoySankhadeep Roy
authored andcommitted
inverse colors added for spinner and progress bar
1 parent 8236e8f commit 7d32ff6

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

Components/Themes/light.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,5 +116,11 @@ module.exports = {
116116
badgeColor: "#fff",
117117
badgeBg: "#ED1727",
118118

119-
lineHeight: 21
119+
lineHeight: 21,
120+
121+
defaultSpinnerColor: "#45D56E",
122+
inverseSpinnerColor: "#1A191B",
123+
124+
defaultProgressColor: "#E4202D",
125+
inverseProgressColor: "#1A191B"
120126
}

Components/Widgets/ProgressBar.android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ export default class SpinnerNB extends NativeBaseComponent {
2929
return(
3030
<ProgressBar {...this.prepareRootProps()} styleAttr = "Horizontal"
3131
indeterminate = {false} progress={this.props.progress ? this.props.progress/100 : 0.5}
32-
color={this.props.color ? this.props.color : '#41B367'} />
32+
color={this.props.color ? this.props.color : this.props.inverse ? this.getTheme().inverseProgressColor :
33+
this.getTheme().defaultProgressColor} />
3334
);
3435
}
3536

Components/Widgets/ProgressBar.ios.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ export default class ProgressBarNB extends NativeBaseComponent {
1515
render() {
1616
return(
1717
<ProgressViewIOS progress={this.props.progress ? this.props.progress/100 : 0.5}
18-
progressTintColor={this.props.color ? this.props.color : '#FD2E1F'} />
18+
progressTintColor={this.props.color ? this.props.color : this.props.inverse ?
19+
this.getTheme().inverseProgressColor :
20+
this.getTheme().defaultProgressColor} />
1921
);
2022
}
2123

Components/Widgets/Spinner.android.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export default class SpinnerNB extends NativeBaseComponent {
2828
render() {
2929
return(
3030
<ProgressBar {...this.prepareRootProps()} styleAttr = {this.props.size ? this.props.size : "Large" }
31-
color={this.props.color ? this.props.color : '#41B367'} />
31+
color={this.props.color ? this.props.color : this.props.inverse ? this.getTheme().inverseSpinnerColor :
32+
this.getTheme().defaultSpinnerColor} />
3233
);
3334
}
3435

Components/Widgets/Spinner.ios.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ export default class SpinnerNB extends NativeBaseComponent {
2727

2828
render() {
2929
return(
30-
<ActivityIndicatorIOS {...this.prepareRootProps()} color={this.props.color ? this.props.color : '#A6A4A2'}
30+
<ActivityIndicatorIOS {...this.prepareRootProps()} color={this.props.color ? this.props.color : this.props.inverse ?
31+
this.getTheme().inverseSpinnerColor :
32+
this.getTheme().defaultSpinnerColor}
3133
size={this.props.size ? this.props.size : "large" } />
3234
);
3335
}

0 commit comments

Comments
 (0)