Update readme
This commit is contained in:
56
README.md
56
README.md
@@ -149,7 +149,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 |
|
||||
|
||||
```jsx
|
||||
<script>
|
||||
@@ -166,4 +166,56 @@ Arguments:
|
||||
<!-- -->
|
||||
</Carousel>
|
||||
<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