Skip to content
This repository was archived by the owner on Feb 6, 2024. It is now read-only.

Commit 577590d

Browse files
doc: pager
1 parent dc02802 commit 577590d

File tree

2 files changed

+35
-3
lines changed

2 files changed

+35
-3
lines changed

doc/features/navigation.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ Furthermore than the default swiping, the [DeckDeckGo] deck expose the following
1212
- [Is the deck at the end](#is-the-deck-at-the-end)
1313
- [Get the index of the current slide](#get-the-index-of-the-current-slide)
1414
- [Get the length of the deck](#get-the-length-of-the-deck)
15+
- [Pager](#pager)
16+
- [Show or hide](#show-or-hide)
17+
- [Customization](#customization)
1518

1619
## Navigation
1720

@@ -65,4 +68,34 @@ await deck.getActiveIndex(); // resolve a number
6568
await deck.getLength(); // resolve a number
6669
```
6770

71+
## Pager
72+
73+
[DeckDeckGo] will per default display a pager in form of a progress circle bar. It's possible to hide it or to customize the following various style options.
74+
75+
### Show or hide
76+
77+
The show or hide options of the pager are available on the `<deckgo-deck>` element.
78+
79+
| Attribute | Type | Default | Description |
80+
| -------------------------- |:-----------------:|:-----------------:|:-----------------:|
81+
| pager | boolean | true | Show or hide the pager |
82+
| pagerPercentage | boolean | true | Show or hide the progression in percentage inside the pager |
83+
84+
### Customization
85+
86+
The following style options are available to style the pager:
87+
88+
| CSS4 variable | Default |
89+
| -------------------------- |:-----------------:|
90+
| --pager-size | 56px |
91+
| --pager-margin-top | 8px |
92+
| --pager-margin-end | 8px |
93+
| --pager-margin-bottom | 8px |
94+
| --pager-margin-start | 8px |
95+
| --pager-background | #eee |
96+
| --pager-text-color | #4c8dff |
97+
| --pager-text-size | 0.5em |
98+
| --pager-stroke-outer-width | 2.8 |
99+
| --pager-stroke-inner-width | 1.8 |
100+
68101
[DeckDeckGo]: https://deckdeckgo.com

src/components/pager/deckdeckgo-pager/deckdeckgo-pager.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
.deckgo-pager-circle-bg {
99
fill: none;
1010
stroke: var(--pager-background, #eee);
11-
stroke-width: var(--pager-stroke-outter-width, 2.8);
11+
stroke-width: var(--pager-stroke-outer-width, 2.8);
1212
}
1313

1414
.deckgo-pager-circle {
@@ -20,8 +20,7 @@
2020

2121
.deckgo-pager-percentage {
2222
fill: var(--pager-text-color, #4c8dff);
23-
font-family: sans-serif;
24-
font-size: 0.5em;
23+
font-size: var(--pager-text-size, 0.5em);
2524
text-anchor: middle;
2625
font-weight: 300;
2726
}

0 commit comments

Comments
 (0)