diff --git a/scm-ui-components/packages/ui-components/package.json b/scm-ui-components/packages/ui-components/package.json index 708412c874..096a8636b3 100644 --- a/scm-ui-components/packages/ui-components/package.json +++ b/scm-ui-components/packages/ui-components/package.json @@ -19,13 +19,14 @@ "flow-bin": "^0.79.1", "flow-typed": "^2.5.1", "jest": "^23.5.0", - "raf": "^3.4.0" + "raf": "^3.4.0", + "react-router-enzyme-context": "^1.2.0" }, "dependencies": { "classnames": "^2.2.6", "moment": "^2.22.2", - "react": "^16.4.2", - "react-dom": "^16.4.2", + "react": "^16.5.2", + "react-dom": "^16.5.2", "react-i18next": "^7.11.0", "react-jss": "^8.6.1", "react-router-dom": "^4.3.1", diff --git a/scm-ui-components/packages/ui-components/src/LinkPaginator.js b/scm-ui-components/packages/ui-components/src/LinkPaginator.js new file mode 100644 index 0000000000..aaf13d7b15 --- /dev/null +++ b/scm-ui-components/packages/ui-components/src/LinkPaginator.js @@ -0,0 +1,133 @@ +//@flow +import React from "react"; +import {translate} from "react-i18next"; +import type {PagedCollection} from "@scm-manager/ui-types"; +import {Button} from "./buttons"; + +type Props = { + collection: PagedCollection, + page: number, + + // context props + t: string => string +}; + +class LinkPaginator extends React.Component { + + renderFirstButton() { + return ( +