elm-dialog
elm-dialog copied to clipboard
Decouple from Bootstrap
Your implementation is pretty neat and I integrated it in my project.. well not exactly. My project is based on Foundation and having a Bootstrap based popup in the middle of it is not ideal.
It would be great if we could specify our own HTML/CSS for the modal layout so that those using Foundation or other would be happy too. And it would potentially make your package more popular by opening it to more users.
How hard is this feature to implement?
Yeah, this would be a great improvement. I don't want this to be tied to Bootstrap, it was just a good starting point.
For my own reference, here are the docs for Foundation modals: http://foundation.zurb.com/sites/docs/reveal.html
All being well I'll take a look at implementing this shortly.
Yesterday evening I created a very basic implementation for Foundation (using Reveal) that does the job for my private project, with the help of your original code. It was not too difficult.
I had some thoughts about updating your library. It should work no matter what CSS framework we are using. You could either provide some options (bootstrap, foundation, other) or, more generic, let the user create his own modal layout. I think the latter solution is the most flexible, it would only involve the user add an HTML template, not a big deal.
Have fun with the implementation! Looking forward to using it. Maybe I can help if I have time.
Right, I've got something that looks okay. Do you want to give the new views
branch a test drive? To try it, you should just need to:
- Check out the
views
branch somewhere. - Add
.../elm-dialog/src
to yoursource-paths
. - Change
Dialog.view
toDialog.foundationView
.
This is the first time I've used Foundation, so take a look and let me know if it looks good. All the code's in Foundation.elm
, so feel free to tweak and PR if you're up for it.