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): Add closeIcon #932

Merged
merged 2 commits into from
Nov 23, 2016
Merged

feat(Modal): Add closeIcon #932

merged 2 commits into from
Nov 23, 2016

Conversation

jeffcarbs
Copy link
Member

@jeffcarbs jeffcarbs commented Nov 23, 2016

Fixes #436

Given #893 is a little controversial due to the reliance on the DOM and data props, this solves a more acute need of adding a close icon to the Modal, which is standard in SUI core (see http://semantic-ui.com/modules/modal.html#/usage):
screen shot 2016-11-23 at 10 57 12 am

While this mixes shorthand with children, I think it's reasonable given:

@@ -45,9 +47,18 @@ class Modal extends Component {
/** Additional classes. */
className: PropTypes.string,

/** Icon */
closeIcon: PropTypes.oneOfType([
PropTypes.node,
Copy link
Member

Choose a reason for hiding this comment

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

How about allowing boolean as well? I would think closeIcon alone would be the primary use case for this prop.

@levithomason
Copy link
Member

I believe this also fixes #436, if so, want to update the description to close it on merge?

@jeffcarbs
Copy link
Member Author

jeffcarbs commented Nov 23, 2016

@levithomason - you're right, added that issue to the description 👍

@levithomason
Copy link
Member

Cool, what do you think about the boolean prop for the default close icon? #932 (comment)

@jeffcarbs
Copy link
Member Author

Added in da00365 👍

@levithomason
Copy link
Member

👍 will merge on pass

@codecov-io
Copy link

codecov-io commented Nov 23, 2016

Current coverage is 100% (diff: 100%)

Merging #932 into master will not change coverage

@@           master   #932   diff @@
====================================
  Files         137    137          
  Lines        2262   2267     +5   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits         2262   2267     +5   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 52b36c7...da00365

@levithomason levithomason merged commit c222ba7 into master Nov 23, 2016
@levithomason levithomason deleted the feature/modal-close-icon branch November 23, 2016 18:15
@levithomason
Copy link
Member

Released in semantic-ui-react@0.61.4.

Arthelon pushed a commit to Arthelon/Semantic-UI-React that referenced this pull request Nov 23, 2016
* feat(Modal): Add closeIcon

* Default closeIcon to `close` if closeIcon=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modal: Support showing Close (X) Icon
3 participants