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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding multiple space-separated classes for openClass #382

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

liamtarpey
Copy link

@liamtarpey liamtarpey commented Oct 21, 2020

Thanks for this library - great solution for us and really lightweight!

Small suggestion here - to allow passing multiple classes to openClass config option.

This would be useful to pass modifier classes such as modal--s for small modal content for eg:

{
  openClass: 'modal--open modal--s'
}

Solution splits this space-separated string into a comma-separated array that we spread into add() and remove().

A long term solution might be to have something like openClasses as the param and the ability to pass an array of classes here rather than a string.

Thanks!

PS. Untested in the lib as I'm still setting it up and might break your Cypress tests for now. Will update if you're interested in this suggestion and when I've set up the project 馃憤

@liamtarpey liamtarpey force-pushed the feature/support-multiple-classes-on-open branch from dedf76c to a7e9e58 Compare October 21, 2020 12:21
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

1 participant