Module: Components::TooltipHelper
- Defined in:
- app/helpers/components/tooltip_helper.rb
Instance Method Summary collapse
- #render_tooltip(**options, &block) ⇒ Object
- #tooltip_content(options = {}, &block) ⇒ Object
- #tooltip_trigger(&block) ⇒ Object
Instance Method Details
#render_tooltip(**options, &block) ⇒ Object
2 3 4 5 |
# File 'app/helpers/components/tooltip_helper.rb', line 2 def render_tooltip(**, &block) content = capture(&block) if block render "components/ui/tooltip", content: content, ** end |
#tooltip_content(options = {}, &block) ⇒ Object
11 12 13 14 |
# File 'app/helpers/components/tooltip_helper.rb', line 11 def tooltip_content( = {}, &block) content_for :tooltip_content_class, [:class], flush: true content_for :tooltip_content, capture(&block), flush: true end |
#tooltip_trigger(&block) ⇒ Object
7 8 9 |
# File 'app/helpers/components/tooltip_helper.rb', line 7 def tooltip_trigger(&block) content_for :tooltip_trigger, capture(&block), flush: true end |