Merge pull request #108 from vadimkorr/feature/#101_Keyboard-control

#101 Keyboard control
This commit is contained in:
Vadim
2022-05-04 22:52:24 +03:00
committed by GitHub
3 changed files with 15 additions and 7 deletions

View File

@@ -12,8 +12,8 @@
export let disabled = false
</script>
<div
class="sc-carousel-arrow__circle"
<button
class="sc-carousel-button sc-carousel-arrow__circle"
class:sc-carousel-arrow__circle_disabled={disabled}
on:click
>
@@ -22,7 +22,7 @@
class:sc-carousel-arrow__arrow-next={direction === NEXT}
class:sc-carousel-arrow__arrow-prev={direction === PREV}
></i>
</div>
</button>
<style>
:root {

View File

@@ -368,4 +368,11 @@
position: absolute;
bottom: 0;
}
:global(.sc-carousel-button) {
all: unset;
cursor: pointer;
}
:global(.sc-carousel-button:focus) {
outline: 5px auto;
}
</style>

View File

@@ -5,11 +5,11 @@
export let active = false
</script>
<div
class="sc-carousel-dot__dot"
<button
class="sc-carousel-button sc-carousel-dot__dot"
class:sc-carousel-dot__dot_active={active}
on:click
></div>
></button>
<style>
:root {
@@ -17,6 +17,7 @@
--sc-active-dot-size: 8px;
--sc-dot-size-animation-time: 250ms;
}
.sc-carousel-dot__dot {
background-color: var(--sc-color-rgb-light);
border-radius: 50%;