Skip to content
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

How do you customize or change the modal button ? How to call a function on modal button click ? #1

Open
GeorgeFlorian opened this issue Jul 30, 2020 · 0 comments

Comments

@GeorgeFlorian
Copy link

GeorgeFlorian commented Jul 30, 2020

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 ?

@GeorgeFlorian GeorgeFlorian changed the title How do you customize btnText ? How do you customize the modal button ? Jul 30, 2020
@GeorgeFlorian GeorgeFlorian changed the title How do you customize the modal button ? How do you customize or change the modal button ? How to call a function on modal button click ? Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant