How do you customize or change the modal button ? How to call a function on modal button click ?
GeorgeFlorian opened this issue · comments
Sloata George commented
I am trying to figure out how to customize the modal button.
I know we can change how it looks by using the CSS tag button
, but I would like to add much more it.
This is what I would like to have instead of the default button.
<span @click.prevent="editFile(file.id)">
<i class="far fa-edit"></i>
</span>
I have tried using template literals like this:
<Modal btnText=`<span @click.prevent="editFile(file.id)">
<i class="far fa-edit"></i>
</span>`
:closeBtn="true"
closeBtnContent="<span>X</span>"
>
<Component/>
</Modal>
but it obviously did not work.
How can we customize the button that opens the modal ?