Pagination dots: Add class as a prop
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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}
|
||||||
|
|||||||
@@ -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>
|
||||||
|
|||||||
Reference in New Issue
Block a user