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

Support centered settings #11537

Merged
merged 3 commits into from Jul 31, 2018
Merged

Conversation

yoyo837
Copy link
Contributor

@yoyo837 yoyo837 commented Jul 31, 2018

First of all, thank you for your contribution! :-)

Clean #11396

Please makes sure that these checkboxes are checked before submitting your PR, thank you!

  • Make sure that you propose PR to right branch: bugfix for master, feature for latest active branch feature-x.x.
  • Make sure that you follow antd's code convention.
  • Run npm run lint and fix those errors before submitting in order to keep consistent code style. windows
  • Rebase before creating a PR to keep commit history clear.
  • Add some descriptions and refer relative issues for you PR.

Extra checklist:

if isBugFix :

  • Make sure that you add at least one unit test for the bug which you had fixed.

elif isNewFeature :

  • Update API docs for the component.
  • Update/Add demo to demonstrate new feature.
  • Update TypeScript definition for the component.
  • Add unit tests for the feature.

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 31, 2018

Deploy preview for ant-design ready!

Built with commit 37b8fa2

https://deploy-preview-11537--ant-design.netlify.com

@yoyo837
Copy link
Contributor Author

yoyo837 commented Jul 31, 2018

@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}
Copy link
Member

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

Copy link
Member

Choose a reason for hiding this comment

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

image

Copy link
Member

@afc163 afc163 Jul 31, 2018

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

Choose a reason for hiding this comment

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

👌

{...this.props}
{...restProps}
prefixCls={prefixCls}
className={classNames({ [`${prefixCls}-centered`]: centered }, className)}
Copy link
Member

Choose a reason for hiding this comment

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

!!centered

@@ -32,6 +32,9 @@ const ConfirmDialog = (props: ConfirmDialogProps) => {
const classString = classNames(
prefixCls,
`${prefixCls}-${props.type}`,
{
[`${prefixCls}-centered`]: props.centered,
Copy link
Member

Choose a reason for hiding this comment

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

!!props.centered,

@codecov
Copy link

codecov bot commented Jul 31, 2018

Codecov Report

Merging #11537 into feature-3.8.0 will increase coverage by 0.08%.
The diff coverage is 100%.

Impacted file tree graph

@@                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
Impacted Files Coverage Δ
components/modal/confirm.tsx 91.89% <ø> (ø) ⬆️
components/modal/Modal.tsx 78.57% <100%> (ø) ⬆️
components/transfer/index.tsx 87.41% <0%> (ø) ⬆️
components/time-picker/index.tsx 74.5% <0%> (ø) ⬆️
components/button/button.tsx 97.52% <0%> (+2.45%) ⬆️

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 0156fef...37b8fa2. Read the comment docs.

@afc163 afc163 merged commit f14e207 into ant-design:feature-3.8.0 Jul 31, 2018
yoyo837 added a commit to yoyo837/ant-design that referenced this pull request Aug 1, 2018
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