Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Button): fix fontSizeSM token not working #44217

Merged

Conversation

CHENGTIANG
Copy link
Contributor

@CHENGTIANG CHENGTIANG commented Aug 14, 2023

[English Template / 英文模板]

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 工作流程
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

问题:
在 ConfigProvider 为 Button 设置 fontSizeSM token,按钮字体大小仍是fontSize token!

解决方案:
genSizeSmallButtonStyle 添加 fontSize token,并设置默认的 fontSizeSM(取 token.fontSize,即14px)

📝 更新日志

语言 更新描述
🇺🇸 英文 fix(Button): fix fontSizeSM token not working
🇨🇳 中文 fix(Button): 修复 fontSizeSM token 不工作问题

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

🚀 概述

🤖 Generated by Copilot at b7ce463

Refactor button component to use fontSizeSM token for small buttons. This improves the consistency and customizability of the button styles.

🔍 实现细节

🤖 Generated by Copilot at b7ce463

  • Add fontSize property to small button style using token.fontSizeSM variable (link)
  • Create token.fontSizeSM variable for small button font size and set it to default button font size (link)

@stackblitz
Copy link

stackblitz bot commented Aug 14, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@github-actions
Copy link
Contributor

github-actions bot commented Aug 14, 2023

@yoyo837 yoyo837 requested a review from MadCcc August 14, 2023 16:25
@argos-ci
Copy link

argos-ci bot commented Aug 14, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 3 changes Aug 14, 2023, 4:27 PM

@afc163 afc163 merged commit 947ea38 into ant-design:feature Aug 16, 2023
57 checks passed
@MadCcc
Copy link
Member

MadCcc commented Aug 17, 2023

fontSizeSM 没有用是因为 Button 本来就没有用过这个 token。

你的需求应该是添加组件 Token,这样改是不合理的。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants