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: Tab Item support icon prop #46096
Conversation
Run & review this pull request in StackBlitz Codeflow. |
Signed-off-by: lijianan <574980606@qq.com>
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
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 cd3303f:
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## feature #46096 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 708 708
Lines 12171 12171
Branches 3204 3204
=========================================
Hits 12171 12171 ☔ View full report in Codecov by Sentry. |
Co-authored-by: MadCcc <madccc@foxmail.com> Signed-off-by: lijianan <574980606@qq.com>
Co-authored-by: MadCcc <madccc@foxmail.com> Signed-off-by: lijianan <574980606@qq.com>
@@ -740,7 +740,7 @@ const genTabStyle: GenerateStyle<TabsToken, CSSObject> = (token: TabsToken) => { | |||
[`& ${tabCls}-remove ${iconCls}`]: { | |||
margin: 0, | |||
}, | |||
[iconCls]: { | |||
[`${iconCls}:not(:last-child)`]: { | |||
marginRight: { |
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.
这里会导致之前版本icon的margin-right丢失
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
💡 Background and solution
📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
🤖[deprecated] Generated by Copilot at 76c76ae
Added the
icon
property to theTabs
component and its documentation. This allows users to specify icons for each tab head and improves the icon alignment and spacing. Updated therc-tabs
dependency to enable this feature.🔍 Walkthrough
🤖[deprecated] Generated by Copilot at 76c76ae
icon
property toTabItemType
interface andTabs
component to display icons on tab heads (link, link, link)genTabStyle
function to add margin to icon element for better spacing and alignment (link)components/tabs/demo/icon.tsx
to useicon
property instead oflabel
for icons (link)