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
Merged

feat: Modal closeIcon #18309

merged 2 commits into from Aug 17, 2019

Conversation

afc163
Copy link
Member

@afc163 afc163 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

Copy link

@tests-checker tests-checker bot left a comment

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

@netlify
Copy link

netlify bot 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
@codecov
Copy link

codecov bot 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
Copy link
Contributor

chenshuai2144 commented Aug 17, 2019

没有 demo 吗?

@afc163
Copy link
Member Author

afc163 commented Aug 17, 2019

没有

@afc163 afc163 merged commit a767a49 into feature Aug 17, 2019
22 checks passed
@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`}>
Copy link
Member

@yesmeck yesmeck Aug 17, 2019

Choose a reason for hiding this comment

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

icon 不是应该放在 span 里吗?

Copy link
Member Author

@afc163 afc163 Aug 17, 2019

Choose a reason for hiding this comment

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

我再起个 PR

Copy link
Member Author

@afc163 afc163 Aug 17, 2019

Choose a reason for hiding this comment

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

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

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