Skip to content

docs(pagination): update documentation/package.json regarding slot definitions #2160

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from Nov 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/components/pagination-nav/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,18 @@ Ellipsis indicator(s) will only be ever shown at the front and/or end of
the page number buttons. For `limit` values less than or equal to `3`, the ellipsis
indicator(s) will never be shown for practical display reasons.

### Named slots

`<b-pagination-nav>` supports several slots that allow you to customize the appearance.

| Slot | Description
|----- | -----------
| `first-text` | The "goto first page" button text (html/sub-components supported)
| `prev-text` | The "goto previous page" button text (html/sub-components supported)
| `next-text` | The "goto next page" button text (html/sub-components supported)
| `last-text` | The "goto last page" button text (html/sub-components supported)
| `ellipsis-text` | the `...` indicator text (html/sub-components supported)

## Alignment

By default the pagination component is left aligned. Change the alignment to
Expand Down
24 changes: 23 additions & 1 deletion src/components/pagination-nav/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,28 @@
"version": "1.0.0",
"meta": {
"title": "Pagination Nav",
"component": "bPaginationNav"
"component": "bPaginationNav",
"slots": [
{
"title": "first-text",
"description": "The \"goto first page\" button text (html/sub-components supported)"
},
{
"title": "prev-text",
"description": "The \"goto previous page\" button text (html/sub-components supported)"
},
{
"title": "next-text",
"description": "The \"goto next page\" button text (html/sub-components supported)"
},
{
"title": "last-text",
"description": "The \"goto last page\" button text (html/sub-components supported)"
},
{
"title": "ellipsis-text",
"description": " | the `...` indicator text (html/sub-components supported)"
}
]
}
}
38 changes: 30 additions & 8 deletions src/components/pagination/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,36 @@
]
},
{
"event": "change",
"description": "when page changes via user interaction",
"args": [
{
"arg": "page",
"description": "Selected page number (starting with 1)"
}
]
"event": "change",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were some trailing spaces in this section

"description": "when page changes via user interaction",
"args": [
{
"arg": "page",
"description": "Selected page number (starting with 1)"
}
]
}
],
"slots": [
{
"title": "first-text",
"description": "The \"goto first page\" button text (html/sub-components supported)"
},
{
"title": "prev-text",
"description": "The \"goto previous page\" button text (html/sub-components supported)"
},
{
"title": "next-text",
"description": "The \"goto next page\" button text (html/sub-components supported)"
},
{
"title": "last-text",
"description": "The \"goto last page\" button text (html/sub-components supported)"
},
{
"title": "ellipsis-text",
"description": " | the `...` indicator text (html/sub-components supported)"
}
]
}
Expand Down