Avoid route change scroll when clicking on links
sapper-noscroll here for the rescue, keeps the scroll position and loads the new page content
This commit is contained in:
@@ -5,9 +5,10 @@
|
||||
export let text = ''
|
||||
export let target = null
|
||||
export let rel = null
|
||||
export let noScroll = null
|
||||
</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>
|
||||
|
||||
Reference in New Issue
Block a user