Sha256: c7fcae90508d0f874380ad45370df46b43bd9f1629d88bfae331ba655ef84282

Contents?: true

Size: 498 Bytes

Versions: 2

Compression:

Stored size: 498 Bytes

Contents

module Components::FilterHelper
  def filter_icon(&block)
    content_for :filter_icon, capture(&block), flush: true
  end

  def render_filter(items, **options, &block)
    content_for :filter_icon, "", flush: true
    content = capture(&block) if block
    input_class = content_for?(:filter_icon) ? "pl-1" : ""
    render "components/ui/filter", items: items, options: options, input_class: input_class, content: content
  end

  def list_item(value:, name:, selected:)
     "#{name}"
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shadcn-ui-0.0.15 app/helpers/components/filter_helper.rb
shadcn-ui-0.0.14 app/helpers/components/filter_helper.rb