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

Iss 26 - Allow Modal Close with Keyboard Control #197

Merged
merged 4 commits into from
Jul 30, 2017

Conversation

calvinfroedge
Copy link
Contributor

This is just an implementation sample with a proposed approach for adding keyboard escape to modals.

A better implementation would be to have a single modal implementation which serves as a higher order component which modal implementation can implement. However, as that sort of pattern does not already exist, this is a possible compromise. Open to discussion either way.

Not ready to merge, just opening up discussion.

@calvinfroedge
Copy link
Contributor Author

calvinfroedge commented Jul 26, 2017

I decided to go ahead and add a higher order BaseModal component. This trims a bit of code from all other implementations as the close button is included in addition to providing the desired keyboard close behavior.

Should be easier to make future changes which affect all modals as well.

Resolves Issue 26. #26

Could do with some additional testing before merge but any issues should be very minor.

@wmbutler
Copy link
Contributor

BitsharesUI Team

@wmbutler wmbutler requested a review from svk31 July 26, 2017 11:31
@svk31
Copy link
Contributor

svk31 commented Jul 30, 2017

Tested and works well, nice work!

@svk31 svk31 merged commit 66d019f into bitshares:bitshares Jul 30, 2017
@calvinfroedge
Copy link
Contributor Author

@svk31 Thanks!

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.

3 participants