Update docs
This commit is contained in:
@@ -350,7 +350,7 @@ Arguments:
|
||||
| Argument | Type | Default | Description |
|
||||
|--------------------|-------------|---------|---------------------------------------|
|
||||
| `pageIndex` | `number` | | Page number |
|
||||
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||
|
||||
</div>
|
||||
|
||||
@@ -371,6 +371,66 @@ Arguments:
|
||||
<button class="button" on:click={goToStartPage}>Go</button>
|
||||
```
|
||||
|
||||
## `goToPrev`
|
||||
Navigates to the previous page
|
||||
|
||||
Arguments:
|
||||
|
||||
<div class="table-wrapper">
|
||||
|
||||
| Argument | Type | Default | Description |
|
||||
|--------------------|-------------|---------|---------------------------------------|
|
||||
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||
|
||||
</div>
|
||||
|
||||
```jsx
|
||||
<script>
|
||||
// ...
|
||||
let carousel;
|
||||
function goToPrevPage() {
|
||||
carousel.goToPrev({ animated: false })
|
||||
}
|
||||
</script>
|
||||
|
||||
<Carousel
|
||||
bind:this={carousel}
|
||||
>
|
||||
<!-- -->
|
||||
</Carousel>
|
||||
<button class="button" on:click={goToPrevPage}>Go</button>
|
||||
```
|
||||
|
||||
## `goToNext`
|
||||
Navigates to the next page
|
||||
|
||||
Arguments:
|
||||
|
||||
<div class="table-wrapper">
|
||||
|
||||
| Argument | Type | Default | Description |
|
||||
|--------------------|-------------|---------|---------------------------------------|
|
||||
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||
|
||||
</div>
|
||||
|
||||
```jsx
|
||||
<script>
|
||||
// ...
|
||||
let carousel;
|
||||
function goToNextPage() {
|
||||
carousel.goToNext({ animated: false })
|
||||
}
|
||||
</script>
|
||||
|
||||
<Carousel
|
||||
bind:this={carousel}
|
||||
>
|
||||
<!-- -->
|
||||
</Carousel>
|
||||
<button class="button" on:click={goToNextPage}>Go</button>
|
||||
```
|
||||
|
||||
<Divider />
|
||||
|
||||
<style>
|
||||
|
||||
Reference in New Issue
Block a user