-
Notifications
You must be signed in to change notification settings - Fork 45
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
Custom button actions #218
Comments
Hi @chrism, sorry to hear you are having trouble! I actually did not implement the custom actions part myself, so I am not 100% sure, but I think maybe the action is supposed to be a function, not a string. In the code, if it is not a built in button type, and you do not pass an action function, it defaults to {
classes: 'button sign-in-button',
text: '<span class="button-text">Sign in</span>',
action() { // do sign in stuff here }
} Please let me know if that works for you! |
Hi @rwwagner90 I'm really sorry I didn't get back to you sooner on this, thanks very much for your reply. I've been on a bit of a deadline & for now decided not to include the additional button in the tour. I'm going to free up some time at the end of this week to look into this and will let you know. Thanks again for the advice. |
No worries, please let me know if it works, and if it does, I would love a PR to update the docs! |
Hi, Finally had chance to take a look at this—works perfectly. I've submitted this PR #220 which hopefully updates the docs in a way you approve. If anything is missing let me know and I'll update it. Thanks again for your help. |
Thanks! |
Hi,
This is a great library but i'm stuck trying to use more button types that the built-in ones.
In my step I'm using the builtInButtons option taken from the dummy app but wanting to include a button which has a custom action.
Both the next and cancel work as expected, but I haven't been able to get the custom action to work no matter what I try.
First, I tried to add it as a custom event when I set the defaults for the tour like this,
Then as a simple action in the route from which the service is added
And failing that using the
when
option in the stepI feel I must have missed something but can't seem to work out what.
If you could help I'd be happy to update the documentation to include this as it would be a big help (at least to me).
Thanks.
The text was updated successfully, but these errors were encountered: