Sha256: 9c5324e2c0e435cecacfa9eb9c7920643241cdb44de3af3f78d4aa2425eb282e

Contents?: true

Size: 688 Bytes

Versions: 27

Compression:

Stored size: 688 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Response
    # Render a pagination widget for search results
    class PaginationComponent < ::ViewComponent::Base
      # @param [Blacklight::Response] response
      # @param [Hash] html html options for the pagination container
      def initialize(response:, html: {}, **pagination_args)
        @response = response
        @html_attr = { aria: { label: t('views.pagination.aria.container_label') } }.merge(html)
        @pagination_args = { outer_window: 2, theme: 'blacklight' }.merge(pagination_args)
      end

      def pagination
        @view_context.paginate @response, **@pagination_args
      end
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
blacklight-7.22.2 app/components/blacklight/response/pagination_component.rb
blacklight-7.22.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.22.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.21.2 app/components/blacklight/response/pagination_component.rb
blacklight-7.21.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.21.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.20.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.20.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.19.2 app/components/blacklight/response/pagination_component.rb
blacklight-7.19.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.19.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.18.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.18.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.17.2 app/components/blacklight/response/pagination_component.rb
blacklight-7.17.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.17.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.16.0 app/components/blacklight/response/pagination_component.rb
blacklight-7.15.2 app/components/blacklight/response/pagination_component.rb
blacklight-7.15.1 app/components/blacklight/response/pagination_component.rb
blacklight-7.15.0 app/components/blacklight/response/pagination_component.rb