21 lines
696 B
Vue
21 lines
696 B
Vue
<template>
|
|
<button type="button" class="inline-flex items-center gap-0.5 transition-colors hover:text-text" @click="$emit('click')">
|
|
<slot />
|
|
<span class="flex flex-col">
|
|
<span
|
|
class="material-symbols-outlined !text-[18px] leading-[8px]"
|
|
:class="active === 'asc' ? 'text-accent' : 'text-muted/40'"
|
|
>arrow_drop_up</span>
|
|
<span
|
|
class="material-symbols-outlined !text-[18px] leading-[8px] -mt-2.5"
|
|
:class="active === 'desc' ? 'text-accent' : 'text-muted/40'"
|
|
>arrow_drop_down</span>
|
|
</span>
|
|
</button>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
defineProps<{ active: 'asc' | 'desc' | null }>()
|
|
defineEmits<{ click: [] }>()
|
|
</script>
|