ant-design / ant-design/pro-components

🐛[BUG] 部分pro-components 无法consume configprovider 的 token

Open
#8,929 0 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 描述

这里我想要改变label下的padding,官网所提供的token是verticalLabelPadding
但我试过了没办法
> ![image](https://github.com/user-attachments/assets/fa61fae2-9f75-428d-9acf-697b20ec0207)

同时我也需要调整procard title的fontSize,官网所提供的token是headerFontSize
但发现只有antd的card可以实现,但procard不行
> ![image](https://github.com/user-attachments/assets/08d36d6f-4364-4433-bb79-074147a8b223)

### 🏞 期望结果

我知道我能通过`Part Info`来实现
但我希望这个bug可以修复

谢谢

### 💻 复现代码
```

......
Part Number} 《《《这里
name={PartProps.part_number}
placeholder='Existing PN'
allowClear={false}
rules={[{required: true, message: ''}]}
width={120}
/>
.....

```

### © 版本信息

"@ant-design/pro-components": "^2.8.2",
"antd": "^5.22.3",
"react": "^18.3.1",
node: v20.17.0

Contributor guide

Open the contributing guide

Research direction

Start by running the provided ConfigProvider reproduction with ProCard and ProFormText, using the Form verticalLabelPadding and Card headerFontSize tokens. Trace how these components consume Ant Design theme tokens; done means both tokens change the label padding and ProCard title font size as expected, with regression coverage for the reported setup.

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
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.