Pagination dots: Add class as a prop
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-25 14:26:31 +01:00
parent 6edbfc9def
commit f11185e940
2 changed files with 3 additions and 2 deletions

View File

@@ -3,11 +3,12 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
// Props // Props
export let className = ''
export let photos export let photos
export let currentIndex export let currentIndex
</script> </script>
<ol class="carousel__dots"> <ol class={className}>
{#each photos as dot, index} {#each photos as dot, index}
<li <li
class:active={index === currentIndex} class:active={index === currentIndex}

View File

@@ -203,7 +203,7 @@
</div> </div>
</div> </div>
<PaginationDots {photos} {currentIndex} <PaginationDots className="carousel__dots" {photos} {currentIndex}
on:goToIndex={event => currentIndex = event.detail.index} on:goToIndex={event => currentIndex = event.detail.index}
/> />
</div> </div>