ant-design / ant-design/pro-components

🐛[BUG] ConfigProvider 对 CheckCard 不生效

Open
#9,125 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
1.4k
Avg merge
10h 44m
Merged PRs (30d)
3

Description

### 🐛 bug 描述

在 CheckCard 父级使用 ConfigProvider 修改 token colorPrimary 为 red,设置的颜色没有生效

### 📷 复现步骤

官方的 Demo 就有这个问题,可以直接查看:https://procomponents.ant.design/components/check-card

第三个demo:

![Image](https://github.com/user-attachments/assets/5562443c-c32f-44b5-81a5-acffc143a8f2)

### 🏞 期望结果

选中效果的边框是通过 ConfigProvider 设置的 red

### 💻 复现代码

线上示例:https://procomponents.ant.design/components/check-card 第三个多选的demo

```jsx

{
console.log('value', value);
}}
defaultValue={['A']}
>


```

### © 版本信息

- ProComponents 版本: 2.8.6
- 浏览器环境: Chrome 版本 136.0.7103.114(正式版本) (arm64)
- 开发环境: mac OS

### 🚑 其他信息

![Image](https://github.com/user-attachments/assets/7b68afc5-2b8e-4d13-ab49-37eb55f6b475)

Contributor guide

Open the contributing guide

Research direction

Start with the third multiple-selection CheckCard demo on the linked documentation page and reproduce the issue using ProComponents 2.8.6. Trace how the ConfigProvider colorPrimary token reaches the selected CheckCard border. Done means the selected border uses the configured red color in the provided example, with the relevant behavior verified in the demo or an equivalent test.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.