Reputation: 15
I have added a button in the slate application. When the user hovers over the button, a tooltip should pop out. I am using a slate button widget.
Upvotes: 0
Views: 186
Reputation: 1369
You can use a clickable widget instead and create a button in it: https://www.palantir.com/docs/foundry/slate/widgets-text/#text
Set the clickable to markdown mode and turn on "Tooltips enabled".
The content of the div can be:
<sl-tooltip>
<button slClickEvent="event" class="pt-button pt-intent-primary">Click Me!</button>
</sl-tooltip>
And will render as:
The event
of the clickable can then be wired to what you want/need, like a toast:
Upvotes: 1