Rename handlers

This commit is contained in:
Vadim
2021-01-20 10:51:36 +03:00
parent 613f00b8bc
commit 666158fbf3
2 changed files with 5 additions and 8 deletions

View File

@@ -15,7 +15,5 @@
<style> <style>
.main-container { .main-container {
display: flex;
width: 100%;
} }
</style> </style>

View File

@@ -4,7 +4,7 @@
import { store } from './store' import { store } from './store'
/** /**
* Enable Next/Previos arrows * Enable Next/Prev arrows
*/ */
export let arrows = true; export let arrows = true;
@@ -14,11 +14,10 @@
children = contentContainerElement.children children = contentContainerElement.children
}) })
function handleLeftClick() { function handlePrevClick() {
store.prev() store.prev()
} }
// TODO: rename to handleNextClick function handleNextClick() {
function handleRightClick() {
store.next() store.next()
} }
</script> </script>
@@ -28,7 +27,7 @@
<div class="side-container"> <div class="side-container">
<span <span
class="clickable" class="clickable"
on:click={handleLeftClick} on:click={handlePrevClick}
>&lt;</span> >&lt;</span>
</div> </div>
{/if} {/if}
@@ -39,7 +38,7 @@
<div class="side-container"> <div class="side-container">
<span <span
class="clickable" class="clickable"
on:click={handleRightClick} on:click={handleNextClick}
>&gt;</span> >&gt;</span>
</div> </div>
{/if} {/if}