-
-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
fix: Popconfirm margin problem when icon is null #42433
Conversation
size-limit report 📦
|
69e3c73
to
dd7cce4
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #42433 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 640 640
Lines 10841 10843 +2
Branches 2945 2945
=========================================
+ Hits 10841 10843 +2
☔ View full report in Codecov by Sentry. |
})} | ||
> | ||
{getRenderPropValue(title)} | ||
<div className={`${prefixCls}-message-text`}> |
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.
好像没有这个 classname 相关的样式?
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.
确实没有,放个 div 也行。但是为了有点语义表达,还是放一个 className。
[中文版模板 / Chinese template]
🤔 This is a ...
🔗 Related issue link
close #42417 (comment)
💡 Background and solution
重构了 Popconfirm 的 dom 结构,如果手动覆盖样式可能会被影响。
核心改动在:https://github.com/ant-design/ant-design/pull/42433/files#diff-d57f0a697c7d1520b5a3174edf0317ae67cb31369b7ca569afa32ce074e2c770
📝 Changelog
title
anddescription
whenicon={null}
.icon={null}
时title
和description
的多余 margin 问题。☑️ Self-Check before Merge
🚀 Summary
🤖 Generated by Copilot at 69e3c73
This pull request enhances the popconfirm component by refactoring its message rendering, improving its style and alignment, and fixing a test file typo. It affects the files
components/popconfirm/PurePanel.tsx
,components/popconfirm/style/index.tsx
, andcomponents/popconfirm/__tests__/index.test.tsx
.🔍 Walkthrough
🤖 Generated by Copilot at 69e3c73
PurePanel.tsx
(link)${prefixCls}-message-text
and render them only if truthy inPurePanel.tsx
(link)style/index.tsx
(link)${componentCls}-message
selector instyle/index.tsx
(link)style/index.tsx
(link)__tests__/index.test.tsx
(link)