projectblacklight/blacklight

View on GitHub
app/components/blacklight/constraint_layout_component.rb

Summary

Maintainability
A
0 mins
Test Coverage
# frozen_string_literal: true

module Blacklight
  class ConstraintLayoutComponent < Blacklight::Component
    def initialize(value:, label: nil, remove_path: nil, classes: nil, search_state: nil)
      @value = value
      @label = label
      @remove_path = remove_path
      @classes = Array(classes).join(' ')
      @search_state = search_state
    end

    def render?
      @value.present?
    end
  end
end