at the end of the day, it was inevitable

This commit is contained in:
Mo Elzubeir
2022-12-09 08:36:26 -06:00
commit 1218570914
1768 changed files with 887087 additions and 0 deletions
@@ -0,0 +1,30 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Button } from 'reactstrap'
export default class LimitSelector extends React.Component {
static propTypes = {
pagerAction: PropTypes.func.isRequired,
limit: PropTypes.number.isRequired,
isCurrent: PropTypes.bool.isRequired
};
onClick = () => {
!this.props.isCurrent && this.props.pagerAction({limitByPage: this.props.limit})
};
render () {
let className = 'table-pager__limit'
if (this.props.isCurrent) {
className += ' ' + className + '--current'
}
return (
<Button color="primary" className={className} onClick={this.onClick}>
{this.props.limit}
</Button>
)
}
}