Class: Blacklight::ConstraintComponent
- Defined in:
- app/components/blacklight/constraint_component.rb
Instance Attribute Summary collapse
-
#facet_item_presenter ⇒ Object
Returns the value of attribute facet_item_presenter.
Instance Method Summary collapse
- #classes ⇒ Object
-
#initialize(facet_item_presenter:, classes: %w[filter mx-1],, layout: Blacklight::ConstraintLayoutComponent) ⇒ ConstraintComponent
constructor
A new instance of ConstraintComponent.
Methods inherited from Component
reset_compiler!, sidecar_files, upstream_sidecar_files
Constructor Details
#initialize(facet_item_presenter:, classes: %w[filter mx-1],, layout: Blacklight::ConstraintLayoutComponent) ⇒ ConstraintComponent
Returns a new instance of ConstraintComponent.
10 11 12 13 14 |
# File 'app/components/blacklight/constraint_component.rb', line 10 def initialize(facet_item_presenter:, classes: %w[filter mx-1], layout: Blacklight::ConstraintLayoutComponent) @facet_item_presenter = facet_item_presenter @classes = classes @layout = layout end |
Instance Attribute Details
#facet_item_presenter ⇒ Object
Returns the value of attribute facet_item_presenter.
16 17 18 |
# File 'app/components/blacklight/constraint_component.rb', line 16 def facet_item_presenter @facet_item_presenter end |
Instance Method Details
#classes ⇒ Object
20 21 22 |
# File 'app/components/blacklight/constraint_component.rb', line 20 def classes @classes + ["filter-#{facet_item_presenter.key.parameterize}"] end |