wwwaiser / react-js-pagination

http://vayser.github.io/react-js-pagination
Creative Commons Zero v1.0 Universal
353 stars 95 forks source link

Cannot set both active and inactive classes #113

Open J4C0814N opened 4 years ago

J4C0814N commented 4 years ago

It doesn't look like it is possible to set both the inactive and active link classes.

For example, trying to set the active link to green with all other links red:

          <Pagination
            activePage={1}
            itemsCountPerPage={1}
            totalItemsCount={10}
            pageRangeDisplayed={5}
            onChange={(e) => selectPage(e)}
            itemClass="page-item"
            linkClass="page-link bg-danger"
            activeLinkClass="bg-success"
          />

Sets all to red, including the active. Looks like linkClass also gets applied to the active link and overrides:

<li class="page-item active"><a class="page-link bg-danger bg-success" href="#" aria-label="Go to page number 1">1</a></li>