feat(Modal): config global okButtonProps & cancelButtonProps#53684
feat(Modal): config global okButtonProps & cancelButtonProps#53684afc163 merged 1 commit intoant-design:nextfrom
Conversation
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
👁 Visual Regression Report for PR #53684 Passed ✅
🎊 Congrats! No visual-regression diff found.
|
WalkthroughThis pull request enhances the Modal component by allowing global configuration of the OK and Cancel buttons' text and properties. This feature enhancement aims to provide more flexibility and customization options for developers using the Modal component. Changes
|
| <ConfirmContent | ||
| {...props} | ||
| confirmPrefixCls={confirmPrefixCls} | ||
| okButtonProps={{ ...contextOkButtonProps, ...okButtonProps }} |
There was a problem hiding this comment.
Ensure that merging of okButtonProps and contextOkButtonProps does not lead to unintended overrides or conflicts. Consider validating the merged result to prevent potential issues.
| confirmPrefixCls={confirmPrefixCls} | ||
| okButtonProps={{ ...contextOkButtonProps, ...okButtonProps }} | ||
| okText={okText || contextOkText} | ||
| cancelButtonProps={{ ...contextCancelButtonProps, ...cancelButtonProps }} |
There was a problem hiding this comment.
Ensure that merging of cancelButtonProps and contextCancelButtonProps does not lead to unintended overrides or conflicts. Consider validating the merged result to prevent potential issues.
| <Footer {...props} onOk={handleOk} onCancel={handleCancel} /> | ||
| <Footer | ||
| {...props} | ||
| okButtonProps={{ ...contextOkButtonProps, ...okButtonProps }} |
There was a problem hiding this comment.
Ensure that merging of okButtonProps and contextOkButtonProps does not lead to unintended overrides or conflicts. Consider validating the merged result to prevent potential issues.
| okButtonProps={{ ...contextOkButtonProps, ...okButtonProps }} | ||
| okText={okText || contextOkText} | ||
| onOk={handleOk} | ||
| cancelButtonProps={{ ...contextCancelButtonProps, ...cancelButtonProps }} |
There was a problem hiding this comment.
Ensure that merging of cancelButtonProps and contextCancelButtonProps does not lead to unintended overrides or conflicts. Consider validating the merged result to prevent potential issues.
More templates
commit: |
Bundle ReportChanges will increase total bundle size by 552 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
Files in
Files in
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## next #53684 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 783 783
Lines 14215 14216 +1
Branches 3737 3737
=========================================
+ Hits 14215 14216 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9b75f5f to
f803fc9
Compare
f803fc9 to
7969c05
Compare
7969c05 to
d701b68
Compare


…uttonProps
中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
支持全局配置 OK 和 Cancel 按钮的文字及属性。
📝 Change Log