mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Improve tooltip partial
Set up default value optiona locals variable
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
%div{"data-controller": "tooltip"}
|
||||
%a{"data-tooltip-target": "element", href: link, class: link_class}
|
||||
- tooltip_placement = defined?(placement) ? placement : "top"
|
||||
- tooltip_link = defined?(link) ? link : ""
|
||||
- tooltip_link_class = defined?(link_class) ? link_class : ""
|
||||
%div{"data-controller": "tooltip", "data-tooltip-placement-value": tooltip_placement }
|
||||
%a{"data-tooltip-target": "element", href: tooltip_link, class: tooltip_link_class}
|
||||
= link_text
|
||||
.tooltip-container
|
||||
.tooltip{"data-tooltip-target": "tooltip"}
|
||||
|
||||
Reference in New Issue
Block a user