From 0e9afa20fa1f314743927850c04fbf98642015ee Mon Sep 17 00:00:00 2001 From: Vadim Date: Sat, 23 Jan 2021 17:14:17 +0300 Subject: [PATCH] Disable buttons if reached limits but not infinite --- src/Arrow/Arrow.svelte | 10 ++++++++++ src/Carousel/Carousel.svelte | 12 ++++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/src/Arrow/Arrow.svelte b/src/Arrow/Arrow.svelte index 5a908fc..0f44fbc 100644 --- a/src/Arrow/Arrow.svelte +++ b/src/Arrow/Arrow.svelte @@ -4,10 +4,16 @@ * Indicates direction of the arrow ('next', 'prev') */ export let direction = NEXT + + /** + * Indicates if button disabled + */ + export let disabled = false
\ No newline at end of file diff --git a/src/Carousel/Carousel.svelte b/src/Carousel/Carousel.svelte index 516f248..c983189 100644 --- a/src/Carousel/Carousel.svelte +++ b/src/Carousel/Carousel.svelte @@ -173,7 +173,11 @@ {#if arrows}
- +
{/if} @@ -199,7 +203,11 @@ {#if arrows}
- +
{/if}