Repository navigation
Conversation
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
👁 Visual Regression Report for PR #59589 Failed ❌
Important There are 3 diffs found in this PR: 🔄
📖 中文报告👁 PR #59589 视觉回归报告 失败 ❌
|
size-limit report 📦
|
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 230 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|
Deploying ant-design with
|
| Latest commit: |
b79ac58
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://38ac6e23.ant-design.pages.dev |
| Branch Preview URL: | https://feat-button-global-variant.ant-design.pages.dev |











English Template / 英文模板
🤔 这个变动的性质是?
🔗 相关 Issue
关联 #59556(本 PR 仅覆盖 Button)。
💡 需求背景和解决方案
Button 目前不会跟随顶层
ConfigProvider.variant。本 PR 接入公共useVariant,让 Button 继承顶层的outlined/filled;不支持的值回退到默认的outlined,组件级和实例级配置继续支持全部六种 Button variant。保留实例
color+variant、type/danger和ghost的既有解析顺序,配置回退按 Formvariant>button.variant> 顶层variant处理。单独设置非solid的button.variant时,现在也会按默认颜色生效;仅设置button.color且没有任何 variant 配置时,保持原有默认行为。公共 hook 的旧调用签名和返回类型保持兼容。验证:相关 4 个 Jest 套件、111 个测试、25 个快照通过;Biome / ESLint 通过。完整类型检查与
feature基线一致,仅有两条既有 allowClear 测试类型错误。📝 更新日志
variantand applies non-solid component variants without requiring a color.variant配置,并支持未配置颜色时使用非solid的组件级变体。