Menu icon Foundation
Adding classes to ModalFactory output

Is it possible to add styling classes to the modal generated by ModalFactory? Or is there an easy way to link the classes to the id chosen that I am missing?

Ideally I would also like to change the overlay-close, is it possible?

This is what I want as output from ModalFactory:

<zf-modal id="dialogModal" overlay-close="false" class="tiny dialog"></zf-modal>

I checked the JS code for ModalFactory and its generated using:

html = '<zf-modal id="' + id + '">' + html + '</zf-modal>';

So it seems like this wont be possible. Is there a reason why its designed like this?

FoundationappsModalFactorycustomclass

Is it possible to add styling classes to the modal generated by ModalFactory? Or is there an easy way to link the classes to the id chosen that I am missing?

Ideally I would also like to change the overlay-close, is it possible?

This is what I want as output from ModalFactory:

<zf-modal id="dialogModal" overlay-close="false" class="tiny dialog"></zf-modal>

I checked the JS code for ModalFactory and its generated using:

html = '<zf-modal id="' + id + '">' + html + '</zf-modal>';

So it seems like this wont be possible. Is there a reason why its designed like this?

Budi Adiono almost 4 years ago

To change the overlay-close should be done by set overlayClose: "false" in the config of ModalFactory, but seems it's buggy since the rendered output become overlayclose="false" instead of overlay-close="false" (with dash).