psu-libraries/psulib_blacklight

View on GitHub
app/components/browse/call_number_toggle.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
# frozen_string_literal: true

module Browse
  class CallNumberToggle < ViewComponent::Base
    attr_reader :list, :id

    def initialize(list:, id:)
      @list = list
      @id = id
    end

    def render?
      list.present? && id.present?
    end

    def target
      "moreCallNumbers#{id}"
    end
  end
end