- Update TabsList.vue to adjust height and border radius for a more modern look - Modify TabsTrigger.vue to enhance padding, font size, and line height for better readability and user experience
29 lines
1.0 KiB
Vue
29 lines
1.0 KiB
Vue
<script setup lang="ts">
|
|
import type { TabsTriggerProps } from 'reka-ui'
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { TabsTrigger, useForwardProps } from 'reka-ui'
|
|
import { cn } from '~/lib/utils'
|
|
|
|
interface Props extends TabsTriggerProps {
|
|
class?: HTMLAttributes['class']
|
|
}
|
|
|
|
const props = defineProps<Props>()
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props
|
|
return delegated
|
|
})
|
|
|
|
const forwarded = useForwardProps(delegatedProps)
|
|
</script>
|
|
|
|
<template>
|
|
<TabsTrigger v-bind="forwarded" :class="cn(
|
|
'inline-flex items-center justify-center whitespace-nowrap rounded-[25px] px-4 py-[10px] text-lg font-medium ring-offset-transparent transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent focus-visible:ring-offset-0 disabled:pointer-events-none disabled:opacity-50 text-white/70 hover:text-white data-[state=active]:bg-accent data-[state=active]:text-white data-[state=active]:shadow-md leading-[1.7em]',
|
|
props.class
|
|
)">
|
|
<slot />
|
|
</TabsTrigger>
|
|
</template>
|