Sha256: 46a38ddfb8831a37ee38e6bffe70922d46860ab3a0ca1a8bf50d35a950b38f1f

Contents?: true

Size: 520 Bytes

Versions: 1

Compression:

Stored size: 520 Bytes

Contents

# frozen_string_literal: true

module Blacklight
  module Response
    class PaginationComponent < ::ViewComponent::Base
      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

1 entries across 1 versions & 1 rubygems

Version Path
blacklight-7.11.1 app/components/blacklight/response/pagination_component.rb