#69 : Update stories

This commit is contained in:
Vadim
2021-09-13 22:52:07 +03:00
parent 3715f77af1
commit 73a985fcb8
4 changed files with 40 additions and 2 deletions

View File

@@ -61,6 +61,16 @@
*/ */
export let swiping = true export let swiping = true
/**
* Number of particles to show
*/
export let particlesToShow = 1
/**
* Number of particles to scroll
*/
export let particlesToScroll = 1
const colors = [ const colors = [
{ color: '#e5f9f0', text: '0' }, { color: '#e5f9f0', text: '0' },
{ color: '#ccf3e2', text: '1' }, { color: '#ccf3e2', text: '1' },
@@ -95,6 +105,8 @@
{autoplayProgressVisible} {autoplayProgressVisible}
{dots} {dots}
{swiping} {swiping}
{particlesToShow}
{particlesToScroll}
on:pageChange={ on:pageChange={
event => console.log(`Current page index: ${event.detail}`) event => console.log(`Current page index: ${event.detail}`)
} }
@@ -122,6 +134,8 @@
{autoplayProgressVisible} {autoplayProgressVisible}
{dots} {dots}
{swiping} {swiping}
{particlesToShow}
{particlesToScroll}
> >
{#each colors2 as { color, text } (color)} {#each colors2 as { color, text } (color)}
<div <div

View File

@@ -61,6 +61,16 @@
*/ */
export let swiping = true export let swiping = true
/**
* Number of particles to show
*/
export let particlesToShow = 1
/**
* Number of particles to scroll
*/
export let particlesToScroll = 1
const colors = [ const colors = [
'#e5f9f0', '#e5f9f0',
'#ccf3e2', '#ccf3e2',
@@ -89,6 +99,8 @@
{autoplayProgressVisible} {autoplayProgressVisible}
{dots} {dots}
{swiping} {swiping}
{particlesToShow}
{particlesToScroll}
let:showPrevPage let:showPrevPage
let:showNextPage let:showNextPage
> >

View File

@@ -61,6 +61,16 @@
*/ */
export let swiping = true export let swiping = true
/**
* Number of particles to show
*/
export let particlesToShow = 1
/**
* Number of particles to scroll
*/
export let particlesToScroll = 1
function onPageChange(event, showPage) { function onPageChange(event, showPage) {
showPage(Number(event.target.value)) showPage(Number(event.target.value))
} }
@@ -93,6 +103,8 @@
{autoplayProgressVisible} {autoplayProgressVisible}
{dots} {dots}
{swiping} {swiping}
{particlesToShow}
{particlesToScroll}
let:currentPageIndex let:currentPageIndex
let:pagesCount let:pagesCount
let:showPage let:showPage

View File

@@ -1,5 +1,5 @@
<script> <script>
import {onMount} from 'svelte' import { onMount } from 'svelte'
import Carousel from '../Carousel.svelte' import Carousel from '../Carousel.svelte'
const colors = [ const colors = [