2024-12-01 15:30:42 +01:00
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { cn } from "@/lib/utils";
|
|
|
|
|
import { ChevronUp } from "lucide-vue-next";
|
|
|
|
|
import {
|
|
|
|
|
SelectScrollUpButton,
|
|
|
|
|
type SelectScrollUpButtonProps,
|
|
|
|
|
useForwardProps,
|
2025-03-28 01:16:24 +01:00
|
|
|
} from "reka-ui";
|
2024-12-01 15:30:42 +01:00
|
|
|
import { type HTMLAttributes, computed } from "vue";
|
|
|
|
|
|
|
|
|
|
const props = defineProps<
|
|
|
|
|
SelectScrollUpButtonProps & { class?: HTMLAttributes["class"] }
|
|
|
|
|
>();
|
|
|
|
|
|
|
|
|
|
const delegatedProps = computed(() => {
|
|
|
|
|
const { class: _, ...delegated } = props;
|
|
|
|
|
|
|
|
|
|
return delegated;
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
const forwardedProps = useForwardProps(delegatedProps);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<template>
|
2025-04-10 13:55:56 +02:00
|
|
|
<SelectScrollUpButton
|
|
|
|
|
data-slot="select-scroll-up-button"
|
|
|
|
|
v-bind="forwardedProps"
|
|
|
|
|
:class="cn('flex cursor-default items-center justify-center py-1', props.class)"
|
|
|
|
|
>
|
2024-12-01 15:30:42 +01:00
|
|
|
<slot>
|
2025-04-10 13:55:56 +02:00
|
|
|
<ChevronUp class="size-4" />
|
2024-12-01 15:30:42 +01:00
|
|
|
</slot>
|
|
|
|
|
</SelectScrollUpButton>
|
|
|
|
|
</template>
|