missing file

This commit is contained in:
Jan 2025-11-27 11:34:31 +01:00
parent ded21ca949
commit 0daf33c503

View file

@ -0,0 +1,63 @@
<template>
<button
@click="$emit('click')"
class="sort-button"
:class="{ 'active': active }"
>
<PhArrowCircleUp weight="fill"
:size="24"
class="sort-icon"
:class="{ 'rotate': direction === 'asc' }"
/>
</button>
</template>
<script>
import {PhArrowCircleUp, PhFunnelSimple} from '@phosphor-icons/vue';
export default {
name: "SortButton",
components: {
PhArrowCircleUp,
PhFunnelSimple
},
emits: ['click'],
props: {
active: {
type: Boolean,
default: false,
},
direction: {
type: String,
default: 'desc',
validator: (d) => (d === 'desc' || d === 'asc'),
}
}
}
</script>
<style scoped>
.sort-button {
background: none;
border: none;
cursor: pointer;
padding: 0;
display: inline-flex;
align-items: center;
justify-content: center;
align-self: center;
}
.sort-icon {
color: #6B869C;
transition: transform 0.3s ease, color 0.2s ease;
}
.sort-button.active .sort-icon {
color: #002F54;
}
.sort-icon.rotate {
transform: rotate(180deg);
}
</style>