Sha256: c1e61b0571f0a802ba860f80740f47f891d9baa954d9e6fcab2569c0cb2a4441

Contents?: true

Size: 469 Bytes

Versions: 11

Compression:

Stored size: 469 Bytes

Contents

module Components::TooltipHelper
  def render_tooltip(**options, &block)
    content = capture(&block) if block
    render "components/ui/tooltip", content: content, **options
  end

  def tooltip_trigger(&block)
    content_for :tooltip_trigger, capture(&block), flush: true
  end

  def tooltip_content(options = {}, &block)
    content_for :tooltip_content_class, options[:class], flush: true
    content_for :tooltip_content, capture(&block), flush: true
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
shadcn-ui-0.0.15 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.14 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.13 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.12 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.10 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.8 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.5 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.4 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.3 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.2 app/helpers/components/tooltip_helper.rb
shadcn-ui-0.0.1 app/helpers/components/tooltip_helper.rb