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: Menu.Item support icon #23629

Merged
merged 12 commits into from
Apr 26, 2020
Merged

Conversation

afc163
Copy link
Member

@afc163 afc163 commented Apr 26, 2020

🤔 This is a ...

  • New feature
  • Site / document update
  • Bug fix
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #23392
close #23456

💡 Background and solution

Menu.Item support icon,
solution: Treat icon as a child element of Menu.Item

image

📝 Changelog

Language Changelog
🇺🇸 English Menu Item and SubMenu support icon prop.
🇨🇳 Chinese Menu Item 和 SubMenu 新增 icon 属性。

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • 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

View rendered components/menu/demo/horizontal.md
View rendered components/menu/demo/inline-collapsed.md
View rendered components/menu/demo/switch-mode.md
View rendered components/menu/index.en-US.md
View rendered components/menu/index.zh-CN.md

Copy link

@tests-checker tests-checker bot left a comment

Choose a reason for hiding this comment

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

Could you please add tests to make sure this change works as expected?

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Apr 26, 2020

@codesandbox-ci
Copy link

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 10599c4:

Sandbox Source
antd reproduction template Configuration

@codecov
Copy link

codecov bot commented Apr 26, 2020

Codecov Report

Merging #23629 into feature will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff            @@
##           feature   #23629   +/-   ##
========================================
  Coverage    98.51%   98.51%           
========================================
  Files          363      363           
  Lines         7254     7268   +14     
  Branches      1999     2014   +15     
========================================
+ Hits          7146     7160   +14     
  Misses         108      108           
Impacted Files Coverage Δ
components/menu/MenuItem.tsx 96.66% <100.00%> (+1.01%) ⬆️
components/menu/SubMenu.tsx 94.11% <100.00%> (+4.11%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d4ede4...b70c7ef. Read the comment docs.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 26, 2020

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 b70c7ef:

Sandbox Source
antd reproduction template Configuration

@afc163
Copy link
Member Author

afc163 commented Apr 26, 2020

需要 approve @hengkx @yoyo837 @xrkffgg

@afc163
Copy link
Member Author

afc163 commented Apr 26, 2020

SubMenu 也支持了 icon,补充了用例。

@afc163 afc163 merged commit 8934bbf into feature Apr 26, 2020
@afc163 afc163 deleted the MengZhaoFly-feat/menu-item-support-icon branch April 26, 2020 15:16
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.

5 participants