diff --git a/src/button/index.tsx b/src/button/index.tsx index 6332b1a21..7d430d0ae 100644 --- a/src/button/index.tsx +++ b/src/button/index.tsx @@ -64,7 +64,8 @@ function Button( style.color = plain ? color : WHITE; if (!plain) { - style.backgroundColor = color; + // Use background instead of backgroundColor to make linear-gradient work + style.background = color; } } diff --git a/src/button/test/__snapshots__/demo.spec.js.snap b/src/button/test/__snapshots__/demo.spec.js.snap index bec3a605a..4a14d2b39 100644 --- a/src/button/test/__snapshots__/demo.spec.js.snap +++ b/src/button/test/__snapshots__/demo.spec.js.snap @@ -32,6 +32,6 @@ exports[`renders demo correctly 1`] = ` 迷你按钮