mirror of
https://github.com/BlossomiShymae/clean-cuts.git
synced 2025-12-06 18:20:47 +01:00
Add back to top button
This commit is contained in:
13
components/BackToTopButton.vue
Normal file
13
components/BackToTopButton.vue
Normal file
@@ -0,0 +1,13 @@
|
||||
<script setup lang="ts">
|
||||
const scrollTop = () => {
|
||||
window.scrollTo(0, 0);
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<NuxtLink class="btn app-background text-light" @click="scrollTop">
|
||||
<MaterialIcon name="arrow-up" :size="24"/> Back to top
|
||||
</NuxtLink>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user