fjvallarino/monomer

Add an optional(?) caret to tooltip box

Closed this issue · 1 comments

The triangle thing that's show near the border of a tooltip box. This is just to improve visual aesthetic.

E.g. https://www.carbondesignsystem.com/components/tooltip/style

Sorry, I originally thought you were talking about the caret on a textField and later about the upper blue line in that page's menu (the highlighted one that says "Style"), which you can emulate using:

tooltip "Tooltip" (button "Increase count" AppIncrease)
 `styleBasic` [border 0 transparent, borderT 5 orange, radiusTL 0, radiusTR 0]

The tooltip style defined in the default themes has rounded corners and a thin border; those are reset by the options set in this example.

I think the triangular caret is specific to the Material Design style, and other themes will have other decorations. I prefer to have the library provide building blocks that allow customization instead of following one specific model. The popup allows for arbitrary content, and it could be a good option for implementing this. Another option is creating a custom tooltip that renders decorations as desired (using the existing one as a base would make sense)