-
-
Notifications
You must be signed in to change notification settings - Fork 49k
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
feat: migrate less to token for Checkbox #42097
Conversation
PR body 里 changelog 填一下 |
lint 有问题,类型需要改一下,可以参照其他的组件,checkbox 的 ComponentToken 这个类型没有使用过大概 |
需要 @MadCcc 给genComponentStyleHooks 加上组件依赖 |
| `@checkbox-size` | `controlInteractiveSize` | - | | ||
| `@checkbox-color` | `colorPrimary` | - | | ||
| `@checkbox-check-color` | `colorWhite` | - | | ||
| `@checkbox-check-bg` | - | 由于样式变化已废弃 | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个可以加回来
<!-- prettier-ignore --> | ||
| less 变量 | Component Token | 备注 | | ||
| --- | --- | --- | | ||
| `@checkbox-size` | `controlInteractiveSize` | - | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个这样的话就可以不用把 checkboxSize 移到 ComponentToken 里去了
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feature #42097 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 640 640
Lines 10855 10855
Branches 2950 2950
=========================================
Hits 10855 10855
☔ View full report in Codecov by Sentry. |
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
ref #41884
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 8d7fece
Moved
checkboxSize
from less variable to component token forCheckbox
component. Updated the migration guide for less variables to component tokens in both English and Chinese documentation.🔍 Walkthrough
🤖 Generated by Copilot at 8d7fece
checkboxSize
property fromCheckboxToken
toComponentToken
interface to enable user customization of checkbox size throughcomponentConfig
prop (link)checkboxSize
property fromgetStyle
function and use component token instead to calculate checkbox width and height (link, link)genComponentStyleHook
function to accept a function that returns component token based on style token, and use it to derivecheckboxSize
fromcontrolInteractiveSize
global variable (link)Checkbox
component to migration guide for less variables to component tokens in English and Chinese documentation, and explain the deprecated or changed less variables and the new component token API (docs/react/migrate-less-variables.en-US.md
,docs/react/migrate-less-variables.zh-CN.md
, link, link)