Module: Renalware::TooltipHelper

Defined in:
app/helpers/renalware/tooltip_helper.rb

Instance Method Summary collapse

Instance Method Details

#tooltip(label:, content:) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/renalware/tooltip_helper.rb', line 5

def tooltip(label:, content:)
  (:span,
              title: content,
              class: "has-tip",
              "aria-haspopup" => "true",
              data: {
                tooltip: "",
                options: "disable_for_touch:true"
              }) do
    label
  end
end

#tooltip_with_block(label:) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
29
# File 'app/helpers/renalware/tooltip_helper.rb', line 18

def tooltip_with_block(label:)
  (:span,
              title: label,
              class: "has-tip",
              "aria-haspopup" => "true",
              data: {
                tooltip: "",
                options: "disable_for_touch: true; hover_delay: 100;"
              }) do
    yield if block_given?
  end
end