ap11
ap11

Reputation: 15

Slate button widget tooltip

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

Answers (1)

ZettaP
ZettaP

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:

enter image description here

The event of the clickable can then be wired to what you want/need, like a toast:

enter image description here

Upvotes: 1

Related Questions