Module: Decidim::TooltipHelper

Included in:
CardLCell, LayoutHelper
Defined in:
app/helpers/decidim/tooltip_helper.rb

Overview

This helper includes some methods to help with the inclusion of tooltips on the layout.

Instance Method Summary collapse

Instance Method Details

#with_tooltip(title, opts = {}) ⇒ Object



7
8
9
10
11
# File 'app/helpers/decidim/tooltip_helper.rb', line 7

def with_tooltip(title, opts = {}, &)
  (:span, title:, data: { tooltip: (:div, title, id: opts[:id], class: opts[:class] || "bottom", role: "tooltip", "aria-hidden": "true") }) do
    capture(&).html_safe
  end
end