Skip to content

Commit

Permalink
fix: declare props as optional
Browse files Browse the repository at this point in the history
  • Loading branch information
codenaz committed Aug 16, 2024
1 parent 5c8629e commit f5ca644
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
20 changes: 10 additions & 10 deletions dist/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import * as React from 'react';

interface PaginatorProps {
currentPage: number;
pageActiveClass: string;
pageNextText: string | React.ReactNode;
pagePrevText: string | React.ReactNode;
pagePrevClass: string;
pageNextClass: string;
pageContainerClass: string;
pageItemClass: string;
pageLimit: number;
pageLinkClass: string;
pageNeighbours: number;
pageActiveClass?: string;
pageNextText?: string | React.ReactNode;
pagePrevText?: string | React.ReactNode;
pagePrevClass?: string;
pageNextClass?: string;
pageContainerClass?: string;
pageItemClass?: string;
pageLimit?: number;
pageLinkClass?: string;
pageNeighbours?: number;
setCurrentPage: (page: number) => void;
setOffset: (offset: number) => void;
totalRecords: number;
Expand Down
2 changes: 1 addition & 1 deletion stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -3346,7 +3346,7 @@
</script>
<script>
const chartParameters = {};
const data = {"version":1,"tree":{"name":"index.esm.js","children":[{"name":"node_modules","children":[{"name":"react-is","children":[{"name":"cjs","children":[{"name":"react-is.production.min.js","uid":"4805-3"},{"name":"react-is.development.js","uid":"4805-5"}]},{"name":"index.js","uid":"4805-6"}]},{"name":"object-assign","children":[{"name":"index.js","uid":"4805-7"}]},{"name":"prop-types","children":[{"name":"lib","children":[{"name":"ReactPropTypesSecret.js","uid":"4805-8"},{"name":"has.js","uid":"4805-9"}]},{"name":"checkPropTypes.js","uid":"4805-10"},{"name":"factoryWithTypeCheckers.js","uid":"4805-11"},{"name":"factoryWithThrowingShims.js","uid":"4805-12"},{"name":"index.js","uid":"4805-13"}]},{"name":"style-inject","children":[{"name":"dist","children":[{"name":"style-inject.es.js","uid":"4805-14"}]}]}]},{"name":"src","children":[{"name":"lib","children":[{"name":"style","children":[{"name":"main.scss","uid":"4805-15"}]},{"name":"paginator.js","uid":"4805-16"},{"name":"index.js","uid":"4805-17"}]}]},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js?commonjs-module","uid":"4805-0"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js?commonjs-module","uid":"4805-1"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports","uid":"4805-2"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js?commonjs-exports","uid":"4805-4"}]},"nodes":{"4805-0":{"renderedLength":30,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js?commonjs-module"},"4805-1":{"renderedLength":28,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js?commonjs-module"},"4805-2":{"renderedLength":32,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports"},"4805-3":{"renderedLength":3196,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js"},"4805-4":{"renderedLength":29,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js?commonjs-exports"},"4805-5":{"renderedLength":7648,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js"},"4805-6":{"renderedLength":319,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js"},"4805-7":{"renderedLength":2348,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/object-assign/index.js"},"4805-8":{"renderedLength":558,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/lib/ReactPropTypesSecret.js"},"4805-9":{"renderedLength":183,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/lib/has.js"},"4805-10":{"renderedLength":4134,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/checkPropTypes.js"},"4805-11":{"renderedLength":23500,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/factoryWithTypeCheckers.js"},"4805-12":{"renderedLength":1943,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/factoryWithThrowingShims.js"},"4805-13":{"renderedLength":747,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js"},"4805-14":{"renderedLength":628,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/style-inject/dist/style-inject.es.js"},"4805-15":{"renderedLength":888,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/style/main.scss"},"4805-16":{"renderedLength":5945,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/paginator.js"},"4805-17":{"renderedLength":0,"isEntry":true,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/index.js"},"4805-18":{"renderedLength":0,"isExternal":true,"id":"react"},"4805-19":{"renderedLength":0,"id":"\u0000commonjsHelpers.js"}},"links":[{"source":"4805-17","target":"4805-16"},{"source":"4805-16","target":"4805-18"},{"source":"4805-16","target":"4805-13"},{"source":"4805-16","target":"4805-15"},{"source":"4805-13","target":"4805-19"},{"source":"4805-13","target":"4805-0"},{"source":"4805-13","target":"4805-6"},{"source":"4805-13","target":"4805-11"},{"source":"4805-13","target":"4805-12"},{"source":"4805-15","target":"4805-14"},{"source":"4805-6","target":"4805-19"},{"source":"4805-6","target":"4805-1"},{"source":"4805-6","target":"4805-3"},{"source":"4805-6","target":"4805-5"},{"source":"4805-11","target":"4805-19"},{"source":"4805-11","target":"4805-6"},{"source":"4805-11","target":"4805-7"},{"source":"4805-11","target":"4805-8"},{"source":"4805-11","target":"4805-9"},{"source":"4805-11","target":"4805-10"},{"source":"4805-12","target":"4805-19"},{"source":"4805-12","target":"4805-8"},{"source":"4805-3","target":"4805-19"},{"source":"4805-3","target":"4805-2"},{"source":"4805-5","target":"4805-19"},{"source":"4805-5","target":"4805-4"},{"source":"4805-7","target":"4805-19"},{"source":"4805-8","target":"4805-19"},{"source":"4805-9","target":"4805-19"},{"source":"4805-10","target":"4805-19"},{"source":"4805-10","target":"4805-8"},{"source":"4805-10","target":"4805-9"}]};
const data = {"version":1,"tree":{"name":"index.cjs.js","children":[{"name":"node_modules","children":[{"name":"react-is","children":[{"name":"cjs","children":[{"name":"react-is.production.min.js","uid":"103d-3"},{"name":"react-is.development.js","uid":"103d-5"}]},{"name":"index.js","uid":"103d-6"}]},{"name":"object-assign","children":[{"name":"index.js","uid":"103d-7"}]},{"name":"prop-types","children":[{"name":"lib","children":[{"name":"ReactPropTypesSecret.js","uid":"103d-8"},{"name":"has.js","uid":"103d-9"}]},{"name":"checkPropTypes.js","uid":"103d-10"},{"name":"factoryWithTypeCheckers.js","uid":"103d-11"},{"name":"factoryWithThrowingShims.js","uid":"103d-12"},{"name":"index.js","uid":"103d-13"}]},{"name":"style-inject","children":[{"name":"dist","children":[{"name":"style-inject.es.js","uid":"103d-14"}]}]}]},{"name":"src","children":[{"name":"lib","children":[{"name":"style","children":[{"name":"main.scss","uid":"103d-15"}]},{"name":"paginator.js","uid":"103d-16"},{"name":"index.js","uid":"103d-17"}]}]},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js?commonjs-module","uid":"103d-0"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js?commonjs-module","uid":"103d-1"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports","uid":"103d-2"},{"name":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js?commonjs-exports","uid":"103d-4"}]},"nodes":{"103d-0":{"renderedLength":30,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js?commonjs-module"},"103d-1":{"renderedLength":28,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js?commonjs-module"},"103d-2":{"renderedLength":32,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js?commonjs-exports"},"103d-3":{"renderedLength":3196,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.production.min.js"},"103d-4":{"renderedLength":29,"id":"\u0000/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js?commonjs-exports"},"103d-5":{"renderedLength":7648,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/cjs/react-is.development.js"},"103d-6":{"renderedLength":319,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/react-is/index.js"},"103d-7":{"renderedLength":2348,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/object-assign/index.js"},"103d-8":{"renderedLength":558,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/lib/ReactPropTypesSecret.js"},"103d-9":{"renderedLength":183,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/lib/has.js"},"103d-10":{"renderedLength":4134,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/checkPropTypes.js"},"103d-11":{"renderedLength":23500,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/factoryWithTypeCheckers.js"},"103d-12":{"renderedLength":1943,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/factoryWithThrowingShims.js"},"103d-13":{"renderedLength":747,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/prop-types/index.js"},"103d-14":{"renderedLength":628,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/node_modules/style-inject/dist/style-inject.es.js"},"103d-15":{"renderedLength":888,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/style/main.scss"},"103d-16":{"renderedLength":5999,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/paginator.js"},"103d-17":{"renderedLength":0,"isEntry":true,"id":"/Users/patrick/Documents/programming/personal-programming/react-paginator/src/lib/index.js"},"103d-18":{"renderedLength":0,"isExternal":true,"id":"react"},"103d-19":{"renderedLength":0,"id":"\u0000commonjsHelpers.js"}},"links":[{"source":"103d-17","target":"103d-16"},{"source":"103d-16","target":"103d-18"},{"source":"103d-16","target":"103d-13"},{"source":"103d-16","target":"103d-15"},{"source":"103d-13","target":"103d-19"},{"source":"103d-13","target":"103d-0"},{"source":"103d-13","target":"103d-6"},{"source":"103d-13","target":"103d-11"},{"source":"103d-13","target":"103d-12"},{"source":"103d-15","target":"103d-14"},{"source":"103d-6","target":"103d-19"},{"source":"103d-6","target":"103d-1"},{"source":"103d-6","target":"103d-3"},{"source":"103d-6","target":"103d-5"},{"source":"103d-11","target":"103d-19"},{"source":"103d-11","target":"103d-6"},{"source":"103d-11","target":"103d-7"},{"source":"103d-11","target":"103d-8"},{"source":"103d-11","target":"103d-9"},{"source":"103d-11","target":"103d-10"},{"source":"103d-12","target":"103d-19"},{"source":"103d-12","target":"103d-8"},{"source":"103d-3","target":"103d-19"},{"source":"103d-3","target":"103d-2"},{"source":"103d-5","target":"103d-19"},{"source":"103d-5","target":"103d-4"},{"source":"103d-7","target":"103d-19"},{"source":"103d-8","target":"103d-19"},{"source":"103d-9","target":"103d-19"},{"source":"103d-10","target":"103d-19"},{"source":"103d-10","target":"103d-8"},{"source":"103d-10","target":"103d-9"}]};

document.addEventListener('DOMContentLoaded', () => {
const width = chartParameters.width || window.innerWidth;
Expand Down
20 changes: 10 additions & 10 deletions types/paginator.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@ import * as React from 'react';

interface PaginatorProps {
currentPage: number;
pageActiveClass: string;
pageNextText: string | React.ReactNode;
pagePrevText: string | React.ReactNode;
pagePrevClass: string;
pageNextClass: string;
pageContainerClass: string;
pageItemClass: string;
pageLimit: number;
pageLinkClass: string;
pageNeighbours: number;
pageActiveClass?: string;
pageNextText?: string | React.ReactNode;
pagePrevText?: string | React.ReactNode;
pagePrevClass?: string;
pageNextClass?: string;
pageContainerClass?: string;
pageItemClass?: string;
pageLimit?: number;
pageLinkClass?: string;
pageNeighbours?: number;
setCurrentPage: (page: number) => void;
setOffset: (offset: number) => void;
totalRecords: number;
Expand Down

0 comments on commit f5ca644

Please sign in to comment.