#31 : Add new demos

This commit is contained in:
Vadim
2021-07-03 22:58:20 +03:00
parent 04d155823c
commit 930ec9f6ae
2 changed files with 58 additions and 3 deletions

View File

@@ -7,6 +7,9 @@
} }
}] }]
], ],
"plugins": [
"@babel/plugin-proposal-class-properties"
],
"env": { "env": {
"test": { "test": {
"presets": [["@babel/preset-env"]] "presets": [["@babel/preset-env"]]

View File

@@ -76,6 +76,58 @@
<Divider /> <Divider />
## Autoplay with duration progress
<Carousel
autoplay
autoplayDuration={5000}
autoplayProgressVisible
>
{#each colors as { color, text } (color)}
<Color {color} {text} />
{/each}
</Carousel>
```jsx
<Carousel
autoplay
autoplayDuration={5000}
autoplayProgressVisible
>
{#each colors as { color, text } (color)}
<Color {color} {text} />
{/each}
</Carousel>
```
<Divider />
## Autoplay with pause on focus
<Carousel
autoplay
autoplayDuration={5000}
autoplayProgressVisible
pauseOnFocus
>
{#each colors as { color, text } (color)}
<Color {color} {text} />
{/each}
</Carousel>
```jsx
<Carousel
autoplay
autoplayDuration={5000}
autoplayProgressVisible
pauseOnFocus
>
{#each colors as { color, text } (color)}
<Color {color} {text} />
{/each}
</Carousel>
```
<Divider />
## Lazy loading of images ## Lazy loading of images
<Carousel <Carousel
let:loaded let:loaded
@@ -219,8 +271,8 @@ Import component
| `autoplay` | `boolean` | `false` | Enables auto play of pages | | `autoplay` | `boolean` | `false` | Enables auto play of pages |
| `autoplayDuration` | `number` | `3000` | Autoplay change interval (ms) | | `autoplayDuration` | `number` | `3000` | Autoplay change interval (ms) |
| `autoplayDirection` | `string` | `'next'` | Autoplay change direction (`next` or `prev`) | | `autoplayDirection` | `string` | `'next'` | Autoplay change direction (`next` or `prev`) |
| `dots` | `boolean` | `true` | Current page indicator dots |
| `pauseOnFocus` | `boolean` | `false` | Pause autoplay on focus | | `pauseOnFocus` | `boolean` | `false` | Pause autoplay on focus |
| `dots` | `boolean` | `true` | Current page indicator dots |
| `timingFunction` | `string` | `'ease-in-out'` | CSS animation timing function | | `timingFunction` | `string` | `'ease-in-out'` | CSS animation timing function |
</div> </div>