diff --git a/.gitignore b/.gitignore index 7ea3ff4..8d082a5 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ lib/ *.log .history/ *storybook.log +src/components/output.css diff --git a/package.json b/package.json index 1ada35e..99066b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@indec/react-commons", - "version": "7.0.2", + "version": "7.0.3", "description": "Common reactjs components for apps", "private": false, "main": "index.js", @@ -8,7 +8,8 @@ "./components": "./components/index.js", "./Icons": "./components/Icons/index.js", "./hooks": "./hooks/index.js", - "./utils": "./utils/index.js" + "./utils": "./utils/index.js", + "./assets": "./assets/index.js" }, "scripts": { "start": "start-storybook -p 6006", diff --git a/src/assets/index.js b/src/assets/index.js new file mode 100644 index 0000000..982fc15 --- /dev/null +++ b/src/assets/index.js @@ -0,0 +1,9 @@ +import footer from './footer.png'; +import logo from './logo.svg'; +import logoRight from './logoRight.png'; + +export { + footer, + logo, + logoRight +}; \ No newline at end of file diff --git a/src/components/Pagination.jsx b/src/components/Pagination.jsx index 6c35a03..8f8fcc1 100644 --- a/src/components/Pagination.jsx +++ b/src/components/Pagination.jsx @@ -20,7 +20,7 @@ export default function Pagination({total = 0, perPage = 10, onChange = () => {} const renderPageNumbers = () => { const pages = []; - const maxVisible = 5; + const maxVisible = window.innerWidth < 640 ? 3 : 5; let startPage = Math.max(1, safePage - Math.floor(maxVisible / 2)); let endPage = Math.min(pagesCount, startPage + maxVisible - 1); @@ -34,7 +34,7 @@ export default function Pagination({total = 0, perPage = 10, onChange = () => {} type="button" key={1} onClick={() => onChange(1)} - className="px-3 py-2 mx-1 text-sm rounded-md bg-white border border-gray-300 hover:bg-gray-50" + className="px-2 sm:px-3 py-2 mx-0.5 sm:mx-1 text-xs sm:text-sm rounded-md bg-white border border-gray-300 hover:bg-gray-50 whitespace-nowrap" > 1 @@ -54,7 +54,7 @@ export default function Pagination({total = 0, perPage = 10, onChange = () => {} type="button" key={i} onClick={() => onChange(i)} - className={`px-3 py-2 mx-1 text-sm rounded-md ${ + className={`px-2 sm:px-3 py-2 mx-0.5 sm:mx-1 text-xs sm:text-sm rounded-md whitespace-nowrap ${ i === safePage ? 'bg-blue-600 text-white border border-blue-600' : 'bg-white border border-gray-300 hover:bg-gray-50' @@ -78,7 +78,7 @@ export default function Pagination({total = 0, perPage = 10, onChange = () => {} type="button" key={pagesCount} onClick={() => onChange(pagesCount)} - className="px-3 py-2 mx-1 text-sm rounded-md bg-white border border-gray-300 hover:bg-gray-50" + className="px-2 sm:px-3 py-2 mx-0.5 sm:mx-1 text-xs sm:text-sm rounded-md bg-white border border-gray-300 hover:bg-gray-50 whitespace-nowrap" > {pagesCount} @@ -90,13 +90,13 @@ export default function Pagination({total = 0, perPage = 10, onChange = () => {} return ( <> -