opencs2-dataset-viewer / src /lib /components /ui /select /select-scroll-up-button.svelte
blanchon's picture
Nerfies-style home, paper-style match header, prettier setup, dataset README
95e3d2a
<script lang="ts">
import { Select as SelectPrimitive } from 'bits-ui';
import { cn, type WithoutChildrenOrChild } from '$lib/utils.js';
import CaretUpIcon from 'phosphor-svelte/lib/CaretUp';
let {
ref = $bindable(null),
class: className,
...restProps
}: WithoutChildrenOrChild<SelectPrimitive.ScrollUpButtonProps> = $props();
</script>
<SelectPrimitive.ScrollUpButton
bind:ref
data-slot="select-scroll-up-button"
class={cn(
"bg-popover top-0 z-10 flex w-full cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5",
className
)}
{...restProps}
>
<CaretUpIcon />
</SelectPrimitive.ScrollUpButton>