-
-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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: tabs support cssVar #45803
feat: tabs support cssVar #45803
Conversation
Run & review this pull request in StackBlitz Codeflow. |
size-limit report 📦
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 116623e:
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #45803 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 706 706
Lines 12015 12190 +175
Branches 3202 3236 +34
==========================================
+ Hits 12015 12190 +175
☔ View full report in Codecov by Sentry. |
)} | ||
popupClassName={classNames(popupClassName, hashId)} | ||
popupClassName={classNames(popupClassName, hashId, rootCls)} |
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.
这里没有 rootClassName 么
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.
以前是没有的
Co-authored-by: MadCcc <madccc@foxmail.com> Signed-off-by: kiner-tang(文辉) <1127031143@qq.com>
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 0fd6677
This pull request enhances the tabs component with CSS variables support and refactors its style code. It adds custom hooks and a provider component to enable dynamic theming and customization of the tabs component and its dropdown menu. It also improves the consistency and compatibility of the CSS variables and calculations by using the
@ant-design/cssinjs
package and extracting common functions to separate files.🔍 Walkthrough
🤖 Generated by Copilot at 0fd6677
unit
function to convert them to CSS units (link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link, link)token.calc
function to create CSS calculation expressions (link, link)tabsCardLineHeight
to theComponentToken
interface (link)token.cardPadding
value with thetoken.tabsCardPadding
value, which is calculated from thetoken.cardPadding
value if it is empty (link)style/index.ts
file, replacing theFullToken
type with theGetDefaultToken
type and removing thegenComponentStyleHook
import (link)genComponentStyleHook
function call by using theprepareComponentToken
function instead of a function expression (link)