[bugfix] Switch: incorrect activeColor when use activeValue

This commit is contained in:
陈嘉涵
2019-06-07 10:52:19 +08:00
parent 094380416e
commit 172ed6eaee
3 changed files with 21 additions and 2 deletions

View File

@@ -35,10 +35,10 @@ function Switch(
const switchStyle = {
fontSize: size,
backgroundColor: value ? activeColor : inactiveColor
backgroundColor: checked ? activeColor : inactiveColor
};
const loadingColor = value ? activeColor || BLUE : inactiveColor || GRAY_DARK;
const loadingColor = checked ? activeColor || BLUE : inactiveColor || GRAY_DARK;
function onClick() {
if (!disabled && !loading) {