Skip to content

Commit

Permalink
Adding "loadingColor" to Button.js
Browse files Browse the repository at this point in the history
There was not a proper way to change the loading color of button. So, I added a prop for that.
  • Loading branch information
rufat authored Jul 22, 2020
1 parent 58fbf8b commit 146717b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/atomic/atoms/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ function Button({
iconColor,
loading,
loadingSize,
loadingColor,
lowercase,
onlyIcon,
opacity,
Expand Down Expand Up @@ -90,7 +91,7 @@ function Button({
}

if (loading) {
content = <ActivityIndicator size={loadingSize} color={theme.COLORS.WHITE} />;
content = <ActivityIndicator size={loadingSize} color={loadingColor || theme.COLORS.WHITE} />;
}

return content;
Expand Down

0 comments on commit 146717b

Please sign in to comment.