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:
@@ -1,9 +1,10 @@
|
||||
<script>
|
||||
export let href = '#'
|
||||
export let text = ''
|
||||
export let noScroll = null
|
||||
</script>
|
||||
|
||||
<a href={href} class="link-change">
|
||||
<a href={href} class="link-change" sapper-noscroll={noScroll}>
|
||||
{text}
|
||||
<span class="icon">
|
||||
<slot></slot>
|
||||
|
||||
Reference in New Issue
Block a user