From 499b7ff686b7999c215e6872646f070aff967e29 Mon Sep 17 00:00:00 2001 From: todd Date: Sun, 11 Nov 2018 12:03:21 +0900 Subject: [PATCH] update documentation/package.json regarding slot definitions --- src/components/pagination-nav/README.md | 12 +++++++ src/components/pagination-nav/package.json | 24 +++++++++++++- src/components/pagination/package.json | 38 +++++++++++++++++----- 3 files changed, 65 insertions(+), 9 deletions(-) diff --git a/src/components/pagination-nav/README.md b/src/components/pagination-nav/README.md index 199d4bbea23..c00b666b92d 100644 --- a/src/components/pagination-nav/README.md +++ b/src/components/pagination-nav/README.md @@ -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 + +`` 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 diff --git a/src/components/pagination-nav/package.json b/src/components/pagination-nav/package.json index 523efb2d8eb..396e3cfd7ea 100644 --- a/src/components/pagination-nav/package.json +++ b/src/components/pagination-nav/package.json @@ -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)" + } + ] } } diff --git a/src/components/pagination/package.json b/src/components/pagination/package.json index c9f9aaa350a..79875629688 100755 --- a/src/components/pagination/package.json +++ b/src/components/pagination/package.json @@ -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", + "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)" } ] }