koel/resources/assets/js/components/ui/tabs/TabButton.vue

22 lines
628 B
Vue
Raw Normal View History

2024-04-04 22:20:42 +00:00
<template>
<button
:aria-selected="selected"
class="cursor-pointer relative px-5 py-3 rounded-t-md opacity-70 bg-white/5 uppercase text-k-text-secondary duration-200 hover:bg-white/10
aria-selected:transition-none aria-selected:text-k-text-primary aria-selected:bg-white/10 aria-selected:opacity-100"
2024-04-23 21:01:27 +00:00
role="tab"
type="button"
2024-04-04 22:20:42 +00:00
@click.prevent="emit('click')"
>
<slot />
</button>
</template>
2024-04-23 21:01:27 +00:00
<script lang="ts" setup>
2024-04-04 22:20:42 +00:00
import { toRefs } from 'vue'
const props = defineProps<{ selected: boolean }>()
const { selected } = toRefs(props)
const emit = defineEmits<{ (e: 'click'): void }>()
</script>