Bring back the sapper-noscroll attribute
All checks were successful
continuous-integration/drone/push Build is passing

Window scroll is now been triggered manually during the page transition and not automatically by Sapper
This commit is contained in:
2020-04-04 11:46:17 +02:00
parent 94fa63ef41
commit 37c5cb2c4e
7 changed files with 11 additions and 8 deletions

View File

@@ -2,6 +2,7 @@
export let href = '#'
export let type = 'a'
export let text = ''
export let noScroll = undefined
</script>
{#if type === 'button'}
@@ -13,7 +14,7 @@
</button>
{:else}
<a {href} class={$$props.class ? $$props.class : 'button'} on:click>
<a {href} class={$$props.class ? $$props.class : 'button'} on:click sapper-noscroll={noScroll}>
<slot></slot>
<div class="text" data-text={text}>
<span>{text}</span>

View File

@@ -1,9 +1,10 @@
<script>
export let href = '#'
export let text = ''
export let noScroll = undefined
</script>
<a href={href} class="link-change">
<a href={href} class="link-change" sapper-noscroll={noScroll}>
{text}
<span class="icon">
<slot></slot>

View File

@@ -3,9 +3,10 @@
export let text = ''
export let target = null
export let rel = null
export let noScroll = undefined
</script>
<a class="link-translate" {href} {target} {rel}>
<a class="link-translate" {href} {target} {rel} sapper-noscroll={noScroll}>
<slot />
<div class="text" data-text={text}>
<span>{text}</span>