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: Modal closeIcon #18309

Merged
merged 2 commits into from Aug 17, 2019

Conversation

@afc163
Copy link
Member

commented Aug 16, 2019

🤔 This is a ...

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

🔗 Related issue link

#18307

💡 Background and solution

<Modal
+ closeIcon={<Icon />}
/>

📝 Changelog

Language Changelog
🇺🇸 English Modal support custom closeIcon.
🇨🇳 Chinese Modal 新增 closeIcon 属性用于自定义关闭图标。

☑️ Self Check before Merge

  • 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/anchor/demo/customizeHighlight.md
View rendered components/anchor/index.en-US.md
View rendered components/anchor/index.zh-CN.md
View rendered components/descriptions/demo/size.md
View rendered components/descriptions/index.en-US.md
View rendered components/descriptions/index.zh-CN.md
View rendered components/modal/index.en-US.md
View rendered components/modal/index.zh-CN.md
View rendered components/steps/demo/nav.md
View rendered components/steps/demo/simple.md
View rendered components/steps/index.en-US.md
View rendered components/steps/index.zh-CN.md

@pr-triage pr-triage bot added the PR: unreviewed label Aug 16, 2019

@tests-checker
Copy link

left a comment

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

@netlify

This comment has been minimized.

Copy link

commented Aug 16, 2019

Deploy preview for ant-design ready!

Built with commit fb1bd71

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

@afc163 afc163 changed the base branch from master to feature Aug 16, 2019

@afc163 afc163 requested a review from zombieJ Aug 16, 2019

@codecov

This comment has been minimized.

Copy link

commented Aug 16, 2019

Codecov Report

❗️ No coverage uploaded for pull request base (feature@4e26107). Click here to learn what that means.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             feature   #18309   +/-   ##
==========================================
  Coverage           ?   96.29%           
==========================================
  Files              ?      278           
  Lines              ?     7533           
  Branches           ?     2094           
==========================================
  Hits               ?     7254           
  Misses             ?      277           
  Partials           ?        2
Impacted Files Coverage Δ
components/modal/Modal.tsx 100% <100%> (ø)

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 4e26107...fb1bd71. Read the comment docs.

@chenshuai2144

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2019

没有 demo 吗?

@afc163

This comment has been minimized.

Copy link
Member Author

commented Aug 17, 2019

没有

@afc163 afc163 merged commit a767a49 into feature Aug 17, 2019

27 of 29 checks passed

Build
Details
Header rules - ant-design No header rules processed
Details
Pages changed - ant-design 214 new files uploaded
Details
LGTM analysis: JavaScript No new or fixed alerts
Details
License Compliance All checks passed.
Details
Mixed content - ant-design No mixed content detected
Details
Redirect rules - ant-design 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
buildsize No change
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codecov/patch No report found to compare against
Details
codecov/project No report found to compare against
Details
netlify/ant-design/deploy-preview Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@afc163 afc163 deleted the feat-close-icon branch Aug 17, 2019

@@ -220,7 +223,7 @@ export default class Modal extends React.Component<ModalProps, {}> {
</LocaleReceiver>
);

const closeIcon = (
const closeIconToRender = closeIcon || (
<span className={`${prefixCls}-close-x`}>

This comment has been minimized.

Copy link
@yesmeck

yesmeck Aug 17, 2019

Member

icon 不是应该放在 span 里吗?

This comment has been minimized.

Copy link
@afc163

afc163 Aug 17, 2019

Author Member

我再起个 PR

This comment has been minimized.

Copy link
@afc163

afc163 Aug 17, 2019

Author Member

@chenshuai2144 果然还是要有例子才行。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.