Update readme
This commit is contained in:
52
README.md
52
README.md
@@ -167,3 +167,55 @@ Arguments:
|
|||||||
</Carousel>
|
</Carousel>
|
||||||
<button class="button" on:click={goToStartPage}>Go</button>
|
<button class="button" on:click={goToStartPage}>Go</button>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### `goToPrev`
|
||||||
|
Navigates to the previous page
|
||||||
|
|
||||||
|
Arguments:
|
||||||
|
|
||||||
|
| Argument | Type | Default | Description |
|
||||||
|
|--------------------|-------------|---------|---------------------------------------|
|
||||||
|
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||||
|
|
||||||
|
```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:
|
||||||
|
|
||||||
|
| Argument | Type | Default | Description |
|
||||||
|
|--------------------|-------------|---------|---------------------------------------|
|
||||||
|
| `options.animated` | `boolean` | `true` | Should it be animated or not |
|
||||||
|
|
||||||
|
```jsx
|
||||||
|
<script>
|
||||||
|
// ...
|
||||||
|
let carousel;
|
||||||
|
function goToNextPage() {
|
||||||
|
carousel.goToNext({ animated: false })
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<Carousel
|
||||||
|
bind:this={carousel}
|
||||||
|
>
|
||||||
|
<!-- -->
|
||||||
|
</Carousel>
|
||||||
|
<button class="button" on:click={goToNextPage}>Go</button>
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user