@summit-electric-supply/ember-peak-pager

1.0.1 • Public • Published

Ember Peak Pager

A simple, flexible and customizable pagination UI component for paginated data.

Compatibility

  • Ember.js v3.16 or above
  • Ember CLI v2.13 or above
  • Node.js v10 or above

Installation

ember install @summit-electric-supply/ember-peak-pager

Usage

Example:

<PeakPager @page={{this.page}} @total="30" @route="index" as |Pages Back Forward isBackEnabled isForwardEnabled|>
  {{#let (if isBackEnabled "enabled-arrow" "disabled")
         (if isForwardEnabled "enabled-arrow" "disabled") as |backClass forwardClass|}}
    <nav class="page-nav">
      <ul class="pagination">
        <li class="arrow prev {{backClass}} page-item">
          <Back class="page-link">
            &laquo;
          </Back>
        </li>
        <Pages as |number Page isCurrentPage isTruncated|>
          {{#if isTruncated}}
            <li class="dots disabled page-item">
              <span class="page-link">...</span>
            </li>
          {{else}}
            <li class="{{if isCurrentPage 'active' ''}} page-number page-item">
              <Page class="page-link">
                {{number}}
              </Page>
            </li>
          {{/if}}
        </Pages>
        <li class="arrow next {{forwardClass}} page-item">
          <Forward class="page-link">
            &raquo;
          </Forward>
        </li>
      </ul>
    </nav>
  {{/let}}
</PeakPager>

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Readme

Keywords

Package Sidebar

Install

npm i @summit-electric-supply/ember-peak-pager

Weekly Downloads

2

Version

1.0.1

License

MIT

Unpacked Size

519 kB

Total Files

16

Last publish

Collaborators

  • seswwylie
  • shernandez1977
  • ahristian