Skip to content

Commit

Permalink
Remove dependencies on classnames as we use it only once and the logi…
Browse files Browse the repository at this point in the history
…c is simple enough

classnames is great, but including it for using it one time is a bit
overkill
Also for #85
  • Loading branch information
MonsieurV committed Mar 16, 2018
1 parent 1d73718 commit b2cce10
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 21 deletions.
11 changes: 2 additions & 9 deletions dist/PaginationBoxView.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
"url": "https://github.com/AdeleD/react-paginate/issues"
},
"dependencies": {
"classnames": "^2.2.5",
"prop-types": "^15.6.1"
},
"peerDependencies": {
Expand Down
9 changes: 2 additions & 7 deletions react_components/PaginationBoxView.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import React, { Component } from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

import PageView from './PageView';
import BreakView from './BreakView';

Expand Down Expand Up @@ -227,11 +225,8 @@ export default class PaginationBoxView extends Component {
const { selected } = this.state;

let disabled = disabledClassName;
const previousClasses = classNames(previousClassName,
{[disabled]: selected === 0});

const nextClasses = classNames(nextClassName,
{[disabled]: selected === pageCount - 1});
const previousClasses = previousClassName + (selected === 0 ? ' disabled' : '');
const nextClasses = nextClassName + (selected === pageCount - 1 ? ' disabled' : '');

return (
<ul className={containerClassName}>
Expand Down
4 changes: 0 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1437,10 +1437,6 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"

classnames@^2.2.5:
version "2.2.5"
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d"

cli-cursor@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
Expand Down

0 comments on commit b2cce10

Please sign in to comment.