-
Notifications
You must be signed in to change notification settings - Fork 70
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: add close button #76
Conversation
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.
One minor improvement requested, but otherwise looks good.
src/js/Lightbox.js
Outdated
if (e && typeof e.preventDefault === "function") { | ||
e.preventDefault(); | ||
} | ||
if (this.settings.onClose) { |
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.
We should probably check that this.settings.onClose
is actually a function before blindly calling it.
…into fred/close-button * 'fred/close-button' of https://github.com/imgix/luminous: Sync with Prettier
@jayeb all changed, can you approve? |
Description
This PR adds a close button at the top-right of the screen. A close button seemed like a standard feature that this library should support. The close button can be disabled with
showCloseButton: false
in the configuration object.This PR fixes #72
New Feature
feat(<area>): added new way to do this cool thing #issue-number
Steps to Test
Review the changes to the tests.