Class: SnFilterable::FilterButtonComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/sn_filterable/filter_button_component.rb

Overview

Handles rendering of the ‘View filters` button for mobile layouts

Instance Method Summary collapse

Constructor Details

#initialize(filtered:, filters:) ⇒ FilterButtonComponent

Returns a new instance of FilterButtonComponent.

Parameters:

  • filtered (Filtered)

    The filtered instance

  • filters (Array<Hash>)

    An array of the filters’ info



6
7
8
9
10
# File 'app/components/sn_filterable/filter_button_component.rb', line 6

def initialize(filtered:, filters:)
  @filtered = filtered
  @filters = filters
  @count = active_filter_count
end