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()
|
||||
|
||||
// Props
|
||||
export let className = ''
|
||||
export let photos
|
||||
export let currentIndex
|
||||
</script>
|
||||
|
||||
<ol class="carousel__dots">
|
||||
<ol class={className}>
|
||||
{#each photos as dot, index}
|
||||
<li
|
||||
class:active={index === currentIndex}
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<PaginationDots {photos} {currentIndex}
|
||||
<PaginationDots className="carousel__dots" {photos} {currentIndex}
|
||||
on:goToIndex={event => currentIndex = event.detail.index}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user