Add size animation to dots, move stories to component folder

This commit is contained in:
Vadim
2021-01-22 14:54:17 +03:00
parent 78c39bf7f1
commit 99f6c2d488
9 changed files with 95 additions and 28 deletions

24
src/Dots/DotsView.svelte Normal file
View File

@@ -0,0 +1,24 @@
<script>
import Dots from './Dots.svelte'
/**
* Amount of pages (amount of dots)
*/
export let pagesCount = 5
/**
* Index of the current page
*/
export let currentPageIndex = 3
function handlePageChange(event) {
currentPageIndex = event.detail
}
</script>
<Dots
{pagesCount}
{currentPageIndex}
on:pageChange={handlePageChange}
>
</Dots>