Sha256: ac4d14d1ae42c5cb731509cc448c7eec0ba61079245c0a362af9dc75984126fc

Contents?: true

Size: 430 Bytes

Versions: 6

Compression:

Stored size: 430 Bytes

Contents

# frozen_string_literal: true

require "dry/view/part"

module Snowpack
  module View
    module Parts
      class Paginated < Dry::View::Part
        attr_reader :pager

        def initialize(pager:, **part_args)
          @pager = pager
          super(**part_args)
        end

        def pagination(locals: {}, **options)
          pager.with(**options).render(:pagination, **locals)
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
snowpack-1.0.0.alpha7 lib/snowpack/view/parts/paginated.rb
snowpack-1.0.0.alpha6 lib/snowpack/view/parts/paginated.rb
snowpack-1.0.0.alpha5 lib/snowpack/view/parts/paginated.rb
snowpack-1.0.0.alpha4 lib/snowpack/view/parts/paginated.rb
snowpack-1.0.0.alpha3 lib/snowpack/view/parts/paginated.rb
snowpack-1.0.0.alpha2 lib/snowpack/view/parts/paginated.rb