#31 : Add new demos
This commit is contained in:
3
.babelrc
3
.babelrc
@@ -7,6 +7,9 @@
|
|||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
],
|
],
|
||||||
|
"plugins": [
|
||||||
|
"@babel/plugin-proposal-class-properties"
|
||||||
|
],
|
||||||
"env": {
|
"env": {
|
||||||
"test": {
|
"test": {
|
||||||
"presets": [["@babel/preset-env"]]
|
"presets": [["@babel/preset-env"]]
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user