Skip to content

Commit

Permalink
wip: Refactor collections based components #917
Browse files Browse the repository at this point in the history
  • Loading branch information
cnouguier committed Aug 21, 2024
1 parent ea73a4b commit ab6ae2a
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 17 deletions.
13 changes: 8 additions & 5 deletions core/client/components/collection/KScrollDown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
/>
<KAction v-else
v-if="isVisible"
id="load-more"
icon="las la-angle-double-down"
color="accent"
id="scroll-down"
:color="color"
:icon="icon"
:size="size"
:flat="false"
:handler="scrollOnce"
/>
</div>
Expand All @@ -27,6 +26,10 @@ const props = defineProps({
type: String,
required: true
},
color: {
type: String,
default: 'grey-7'
},
icon: {
type: String,
default: 'las la-angle-double-down'
Expand Down Expand Up @@ -81,4 +84,4 @@ function scrollOnce () {
defineExpose({
refresh
})
</script>
</script>
37 changes: 25 additions & 12 deletions core/client/components/collection/KScrollToTop.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<template>
<KAction
v-if="isVisible"
id="back-to-top"
tooltip="KScrollToTop.TOOLTIP"
icon="vertical_align_top"
color="accent"
:flat="false"
:size="size"
:handler="scrollToTop"
/>
<div class="k-scroll-to-top">
<KAction
v-if="isVisible"
id="scroll-to-top"
tooltip="KScrollToTop.TOOLTIP"
:icon="icon"
:color="color"
:flat="false"
:size="size"
:handler="scrollToTop"
/>
</div>
</template>

<script setup>
Expand All @@ -21,9 +23,13 @@ const props = defineProps({
type: String,
required: true
},
color: {
type: String,
default: 'grey-7'
},
icon: {
type: String,
default: 'vertical_align_top'
default: 'las la-arrow-up'
},
size: {
type: String,
Expand Down Expand Up @@ -62,4 +68,11 @@ function scrollToTop () {
defineExpose({
refresh
})
</script>
</script>

<style lang="scss" scoped>
.k-scroll-to-top {
position: relative;
transform: translate(-48px, -24px);
}
</style>

0 comments on commit ab6ae2a

Please sign in to comment.