-
Notifications
You must be signed in to change notification settings - Fork 18
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
Request: containerId prop #13
Comments
Thanks for the suggestions. I never thought that many people would use this
|
Sorry, just kind of forgot about this. Are you still wanting this added? |
I would certainly like it to be added. As of today I am also using this code, also because it is just a simple scaffoldy thing. I'm trying to do a very particular kind of popup that nothing out-of-the-box will do and I was reluctant to start from scratch (deadlines, you know). Your code is pretty much exactly what I wanted to find - there must be others like me and johncip out there. So thanks - and yes: please make the changes - both the ID and the renamed class props. :) |
As it turns out, we're moving to SMACSS, and I most likely won't have to use an ID to get the right specificity. But it'd still be nice to have. There's no hurry on my end. |
Hey, I like your modal component and have been using it. Unlike many others, it doesn't have a ton of dependencies, or do nasty things with focus, or add 50k to my page weight :)
One thing that would be useful is if the API allowed setting the ID of the "container" div, in addition to its class. Using IDs helps with CSS specificity, and often you only have one instance of a modal anyway, which using IDs helps to document in the stylesheet.
(I know I have full control over the child elements I pass in, but I'm currently using your modal in a context where adding another div isn't a great option.)
On that note, I think it'd also be nice if instead of className and containerClassName, the props were overlayClassName and className, respectively. Then using it would look something like,
In my mind, "modal" is short for "modal dialog" and what you refer to as the container, I think of as the top-level element of that dialog.
The text was updated successfully, but these errors were encountered: