Skip to content

Conversation

@Laffery
Copy link
Collaborator

@Laffery Laffery commented Jun 20, 2025

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Application (the showcase website) / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: N/A

What is the new behavior?

support nzColor and nzVariant, align with antd

https://ant.design/components/button#button-demo-color-variant

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

RFC: ant-design/ant-design#49700

@zorro-bot
Copy link

zorro-bot bot commented Jun 20, 2025

This preview will be available after the AzureCI is passed.

@codecov
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

Attention: Patch coverage is 95.83333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 91.99%. Comparing base (42bbb0c) to head (64d1361).
Report is 18 commits behind head on master.

Files with missing lines Patch % Lines
components/button/button.component.ts 95.83% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9237      +/-   ##
==========================================
- Coverage   91.99%   91.99%   -0.01%     
==========================================
  Files         560      560              
  Lines       19617    19652      +35     
  Branches     3095     3106      +11     
==========================================
+ Hits        18047    18079      +32     
- Misses       1233     1234       +1     
- Partials      337      339       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@WwwHhhYran
Copy link
Member

WwwHhhYran commented Jun 26, 2025

🤔 有一个疑问:nzTypenzVariant 有一些选项是重复的,比如 'dashed', 'link', 'text'nzColor 也与 nzType 有重复,比如 ‘primary’nzColornzType 一起使用可以理解的,能够组合出不同的 type + color,一个对应形态,一个对应颜色;但是 nzVariantnzType 是不是本身在语义上就有一定的重复?

@Laffery
Copy link
Collaborator Author

Laffery commented Jun 26, 2025

🤔 有一个疑问:nzTypenzVariant 有一些选项是重复的,比如 'dashed', 'link', 'text'nzColor 也与 nzType 有重复,比如 ‘primary’nzColornzType 一起使用可以理解的,能够组合出不同的 type + color,一个对应形态,一个对应颜色;但是 nzVariantnzType 是不是本身在语义上就有一定的重复?

我理解 nzType 属于预设样式,nzVariant + nzColor 供用户灵活变体。比如用户的设计系统里面就是希望 primary 按钮是 dashed + green,过去只能通过 css 设置,现在有更灵活方便的选项供选择

@HyperLife1119
Copy link
Collaborator

RFC: ant-design/ant-design#49700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants