-
Notifications
You must be signed in to change notification settings - Fork 11
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
manual open/close? #18
Comments
I'll add this feature request to the next release. Feature Description
|
That's pretty cool and useful. Might it be simpler to make methods that you could call using svelte/html events? That way it can be dealt with directly. like for example
open/close methods could then be used in non-tooltip situations... like for example a ux/ui tutorial, where they'd be fired on elements in a certain order, but only because |
I had that thought initially. I could combine all of them so everything is out there. You can be explicit with events or control behavior via callbacks |
That sounds great. Thanks and well done. |
After thinking about it, I'm just going to make the |
you'll have something like this now <script>
import { Tooltip } from '@svelte-plugins/tooltips';
let isVisible = false;
const hideOnClick = () => (isVisible = false);
</script>
<p>
This tooltip should appear to the
<Tooltip
bind:show={isVisible}
action="click"
align="center"
content="I should appear to the right."
position="right">
<b>right</b>
</Tooltip>
when clicked.
</p>
<button on:click={hideOnClick}>Close the tooltip</button> |
One of the things I dislike about github is that notifications are very out of the way. I'm always missing stuff. This looks fabulous thanks for your work! |
I have a bit that was "click to open" > "click or mouseout to close" that I'm wanting to replace.
Is there a flag to set or a method that can be fired to manually open/close the item?
I expect not, so therefore, how might the plugin might be modified to do so?
Thanks either way.
The text was updated successfully, but these errors were encountered: