Skip to content
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

Merged
merged 8 commits into from Nov 28, 2023
Merged

feat: Tab Item support icon prop #46096

merged 8 commits into from Nov 28, 2023

Conversation

li-jia-nan
Copy link
Member

@li-jia-nan li-jia-nan commented Nov 27, 2023

[中文版模板 / Chinese template]

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Enhancement feature
  • Internationalization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Workflow
  • Other (about what?)

🔗 Related issue link

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English feat: Tab Item support icon prop
🇨🇳 Chinese Tab Item 支持 icon 属性

☑️ Self-Check before Merge

⚠️ Please check all items below before requesting a reviewing. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

🤖[deprecated] Generated by Copilot at 76c76ae

Added the icon property to the Tabs component and its documentation. This allows users to specify icons for each tab head and improves the icon alignment and spacing. Updated the rc-tabs dependency to enable this feature.

🔍 Walkthrough

🤖[deprecated] Generated by Copilot at 76c76ae

  • Add icon property to TabItemType interface and Tabs component to display icons on tab heads (link, link, link)
  • Update genTabStyle function to add margin to icon element for better spacing and alignment (link)
  • Update components/tabs/demo/icon.tsx to use icon property instead of label for icons (link)

Copy link

stackblitz bot commented Nov 27, 2023

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link
Contributor

github-actions bot commented Nov 27, 2023

Preview Is ready

Signed-off-by: lijianan <574980606@qq.com>
Copy link

socket-security bot commented Nov 27, 2023

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
rc-tabs 12.14.1 None +0 161 kB

Copy link
Contributor

github-actions bot commented Nov 27, 2023

size-limit report 📦

Path Size
./dist/antd.min.js 330 KB (-248 B 🔽)
./dist/antd-with-locales.min.js 376.11 KB (-11 B 🔽)

Copy link

codesandbox-ci bot commented Nov 27, 2023

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:

Sandbox Source
antd reproduction template (forked) Configuration

Copy link

argos-ci bot commented Nov 27, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 🧿 Changes detected (Review) 6 changes Nov 28, 2023, 3:32 AM

Copy link

codecov bot commented Nov 27, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (cc57244) 100.00% compared to head (cd3303f) 100.00%.
Report is 1 commits behind head on feature.

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.
📢 Have feedback on the report? Share it here.

li-jia-nan and others added 2 commits November 28, 2023 11:17
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>
@MadCcc MadCcc merged commit 1eee6d9 into feature Nov 28, 2023
104 of 105 checks passed
@MadCcc MadCcc deleted the rc-tabs branch November 28, 2023 03:49
@vagusX vagusX mentioned this pull request Dec 4, 2023
@@ -740,7 +740,7 @@ const genTabStyle: GenerateStyle<TabsToken, CSSObject> = (token: TabsToken) => {
[`& ${tabCls}-remove ${iconCls}`]: {
margin: 0,
},
[iconCls]: {
[`${iconCls}:not(:last-child)`]: {
marginRight: {
Copy link

@ANM699 ANM699 Feb 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里会导致之前版本icon的margin-right丢失

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants