Sha256: c06fa72272d309403c6dad31a64fab963631341adfe674d642d62fc442677ff0

Contents?: true

Size: 469 Bytes

Versions: 11

Compression:

Stored size: 469 Bytes

Contents

module Components::PopoverHelper
  def render_popover(**options, &block)
    content = capture(&block) if block
    render "components/ui/popover", content: content, **options
  end

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

  def popover_content(options = {}, &block)
    content_for :popover_content_class, options[:class], flush: true
    content_for :popover_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/popover_helper.rb
shadcn-ui-0.0.14 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.13 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.12 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.10 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.8 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.5 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.4 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.3 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.2 app/helpers/components/popover_helper.rb
shadcn-ui-0.0.1 app/helpers/components/popover_helper.rb