-
-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from acelaya/feature/paginated-charts
Feature/paginated charts
- Loading branch information
Showing
25 changed files
with
447 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,11 @@ body, | |
margin: 0 auto !important; | ||
} | ||
} | ||
|
||
.pagination .page-link { | ||
cursor: pointer; | ||
} | ||
|
||
.paddingless { | ||
padding: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import { DropdownItem, DropdownMenu, DropdownToggle, UncontrolledDropdown } from 'reactstrap'; | ||
import * as PropTypes from 'prop-types'; | ||
|
||
const propTypes = { | ||
toggleClassName: PropTypes.string, | ||
ranges: PropTypes.arrayOf(PropTypes.number).isRequired, | ||
value: PropTypes.number.isRequired, | ||
setValue: PropTypes.func.isRequired, | ||
}; | ||
|
||
const PaginationDropdown = ({ toggleClassName, ranges, value, setValue }) => ( | ||
<UncontrolledDropdown> | ||
<DropdownToggle caret color="link" className={toggleClassName}> | ||
Paginate | ||
</DropdownToggle> | ||
<DropdownMenu right> | ||
{ranges.map((itemsPerPage) => ( | ||
<DropdownItem key={itemsPerPage} active={itemsPerPage === value} onClick={() => setValue(itemsPerPage)}> | ||
<b>{itemsPerPage}</b> items per page | ||
</DropdownItem> | ||
))} | ||
<DropdownItem divider /> | ||
<DropdownItem disabled={value === Infinity} onClick={() => setValue(Infinity)}> | ||
<i>Clear pagination</i> | ||
</DropdownItem> | ||
</DropdownMenu> | ||
</UncontrolledDropdown> | ||
); | ||
|
||
PaginationDropdown.propTypes = propTypes; | ||
|
||
export default PaginationDropdown; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,7 +10,3 @@ | |
margin: 3.5px 0 0; | ||
float: right; | ||
} | ||
|
||
.sorting-dropdown__paddingless.sorting-dropdown__paddingless { | ||
padding: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
.graph-card__footer--sticky { | ||
position: sticky; | ||
bottom: 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.