Skip to content

Commit

Permalink
docs(BackToTop): update to use VFab
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Apr 21, 2024
1 parent 7ced152 commit f4a5414
Showing 1 changed file with 9 additions and 30 deletions.
39 changes: 9 additions & 30 deletions packages/docs/src/components/app/BackToTop.vue
Original file line number Diff line number Diff line change
@@ -1,25 +1,14 @@
<template>
<v-layout-item
class="text-end pointer-events-none"
position="bottom"
size="88"
model-value
<v-fab
v-model="model"
color="primary"
elevation="8"
icon="mdi-chevron-up"
size="large"
app
v-scroll="onScroll"
>
<div class="ma-4">
<v-fab-transition>
<v-btn
v-show="model"
class="mt-auto pointer-events-initial"
color="primary"
elevation="8"
icon="mdi-chevron-up"
size="large"
@click="goTo(0)"
/>
</v-fab-transition>
</div>
</v-layout-item>
@click="goTo(0)"
/>
</template>

<script setup>
Expand All @@ -31,13 +20,3 @@
model.value = window.scrollY > 200
}
</script>

<style scoped>
.pointer-events-none {
pointer-events: none;
}
.pointer-events-initial {
pointer-events: initial;
}
</style>

0 comments on commit f4a5414

Please sign in to comment.