Skip to content

Commit

Permalink
fix(docs): correct structure of pagination render functions
Browse files Browse the repository at this point in the history
fixes #7897
fixes #7896
  • Loading branch information
nolimits4web committed Feb 17, 2025
1 parent 2446102 commit b259723
Showing 1 changed file with 22 additions and 10 deletions.
32 changes: 22 additions & 10 deletions src/types/modules/pagination.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,12 @@ export interface PaginationOptions {
* ```js
* const swiper = new Swiper('.swiper', {
* //...
* renderBullet: function (index, className) {
* return '<span class="' + className + '">' + (index + 1) + '</span>';
* }
* pagination: {
* //...
* renderBullet: function (index, className) {
* return '<span class="' + className + '">' + (index + 1) + '</span>';
* },
* },
* });
* ```
*/
Expand All @@ -158,11 +161,14 @@ export interface PaginationOptions {
* ```js
* const swiper = new Swiper('.swiper', {
* //...
* renderFraction: function (currentClass, totalClass) {
* pagination: {
* //...
* renderFraction: function (currentClass, totalClass) {
* return '<span class="' + currentClass + '"></span>' +
* ' of ' +
* '<span class="' + totalClass + '"></span>';
* }
* },
* },
* });
* ```
*/
Expand All @@ -177,9 +183,12 @@ export interface PaginationOptions {
* ```js
* const swiper = new Swiper('.swiper', {
* //...
* renderProgressbar: function (progressbarFillClass) {
* pagination: {
* //...
* renderProgressbar: function (progressbarFillClass) {
* return '<span class="' + progressbarFillClass + '"></span>';
* }
* },
* },
* });
* ```
*/
Expand All @@ -195,9 +204,12 @@ export interface PaginationOptions {
* ```js
* const swiper = new Swiper('.swiper', {
* //...
* renderCustom: function (swiper, current, total) {
* return current + ' of ' + total;
* }
* pagination: {
* //...
* renderCustom: function (swiper, current, total) {
* return current + ' of ' + total;
* },
* },
* });
* ```
*/
Expand Down

0 comments on commit b259723

Please sign in to comment.