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
Support centered settings #11537
Support centered settings #11537
Conversation
Deploy preview for ant-design ready! Built with commit 37b8fa2 |
@afc163 The ci tests has failed, what did I missed? |
@@ -188,7 +194,8 @@ export default class Modal extends React.Component<ModalProps, {}> { | |||
|
|||
return ( | |||
<Dialog | |||
{...this.props} | |||
{...restProps} |
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.
prefixCls is missing in restProps
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.
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.
Please run npm test
in your local environment to make sure test is OK.
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.
You can keep this.props
usage.
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.
I want to drop the centered
.
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.
👌
components/modal/Modal.tsx
Outdated
{...this.props} | ||
{...restProps} | ||
prefixCls={prefixCls} | ||
className={classNames({ [`${prefixCls}-centered`]: centered }, 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.
!!centered
components/modal/confirm.tsx
Outdated
@@ -32,6 +32,9 @@ const ConfirmDialog = (props: ConfirmDialogProps) => { | |||
const classString = classNames( | |||
prefixCls, | |||
`${prefixCls}-${props.type}`, | |||
{ | |||
[`${prefixCls}-centered`]: props.centered, |
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.
!!props.centered,
Codecov Report
@@ Coverage Diff @@
## feature-3.8.0 #11537 +/- ##
=================================================
+ Coverage 91.92% 92% +0.08%
=================================================
Files 199 199
Lines 5089 5129 +40
Branches 1416 1441 +25
=================================================
+ Hits 4678 4719 +41
- Misses 405 406 +1
+ Partials 6 4 -2
Continue to review full report at Codecov.
|
First of all, thank you for your contribution! :-)
Clean #11396
Please makes sure that these checkboxes are checked before submitting your PR, thank you!
master
, feature for latest active branchfeature-x.x
.npm run lint
and fix those errors before submitting in order to keep consistent code style.windows
Extra checklist:
if isBugFix :
elif isNewFeature :