ifad / data-confirm-modal

Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.
MIT License
271 stars 115 forks source link

Configurable close button #69

Closed Ceda closed 6 years ago

Ceda commented 6 years ago

@vjt I thought global settings would be enough, but I added the option to set the closeButton from data-attribute

vjt commented 6 years ago

Thank you. The only thing that smells here is that the close button, to function, needs to have the specific attribute data-dismiss="modal". This is an implementation detail of the modal, that we are leaking out in configuration.

Would your use case be satisfied by having the possibility of customising the contents of the <button></button>, and not the whole <button> tag?

Thanks!

Ceda commented 6 years ago

@vjt Config only button body is better variant ;)

vjt commented 6 years ago

Great. Thank you!