UNPKG

@logo-elements/pagination

Version:

Simple, easy to use component for pagination

147 lines (126 loc) 5.14 kB
<!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes"> <title>Logo Elements Pagination Demo</title> <script type="module"> import '@polymer/iron-demo-helpers/demo-pages-shared-styles'; import '@polymer/iron-demo-helpers/demo-snippet'; </script> <script src="../node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script> <script src="../node_modules/web-animations-js/web-animations-next-lite.min.js"></script> <script type="module" src="../logo-elements-pagination.js"></script> <script type="module" src="../icons/logo-elements-pagination-icons.js"></script> </head> <body> <div class="vertical-section-container centered"> <h3>Paginator can be positioned</h3> <demo-snippet> <template> <logo-elements-pagination total-items="3" item-per-page="10"></logo-elements-pagination> <logo-elements-pagination total-items="37" item-per-page="10"></logo-elements-pagination> <logo-elements-pagination total-items="100" item-per-page="10" position="center"></logo-elements-pagination> <logo-elements-pagination total-items="100" item-per-page="10" position="left"></logo-elements-pagination> </template> </demo-snippet> <h3>Paginator's pages number can be customized</h3> <demo-snippet> <template> <logo-elements-pagination total-items="100" item-per-page="10" view-page-range="3"></logo-elements-pagination> <logo-elements-pagination total-items="100" item-per-page="10" view-page-range="10"></logo-elements-pagination> <logo-elements-pagination total-items="10" item-per-page="10" view-page-range="10"></logo-elements-pagination> </template> </demo-snippet> <h3>Hide controll element</h3> <demo-snippet> <template> <logo-elements-pagination total-items="100" item-per-page="10" view-page-range="3" hide-page-element></logo-elements-pagination> </template> </demo-snippet> <h3>Paginator can be stylized</h3> <demo-snippet> <template> <custom-style> <style> logo-elements-pagination.custom { --paper-icon-button:{ color: orange; opacity: 1; } --paper-icon-button-disabled: { color: #F79862; opacity: 0.5; } --paper-input-container: { --paper-input-container-color: #F79862; --paper-input-container-focus-color: orange; --paper-input-container-input-color: orange; } --paper-input-container-underline: { opacity: 0.5; } --paper-button: { color: orange; } --paper-button-disabled: { background-color: orange; color: white; } --paper-dropdown-menu: { color: orange; --paper-listbox-color: orange; --paper-listbox-color: orange; } --paper-dropdown-menu-icon: { color: orange; } } </style> </custom-style> <logo-elements-pagination class="custom" total-items="20" item-per-page="5" view-page-range="10"></logo-elements-pagination> <custom-style> <style> logo-elements-pagination.custom2nd { --paper-icon-button:{ color: blue; opacity: 1; } --paper-icon-button-disabled: { color: blue; opacity: 0.5; } --paper-input-container: { --paper-input-container-color: blue; --paper-input-container-focus-color: blue; --paper-input-container-input-color: blue; } --paper-input-container-label:{ opacity: 0.5; } --paper-input-container-underline: { opacity: 0.5; } --paper-button: { color: blue; } --paper-button-disabled: { background-color: blue; color: white; } --paper-dropdown-menu: { color: blue; --paper-listbox-color: blue; } --paper-dropdown-menu-icon: { color: blue; } } </style> </custom-style> <logo-elements-pagination class="custom2nd" total-items="20" item-per-page="5" view-page-range="10"></logo-elements-pagination> </template> </demo-snippet> </div> </body> </html>