- Added new AppHeader and BottomNav components for better navigation across the application. - Introduced AreaTabs for product area navigation and integrated RoleSwitcher for user role management. - Created CartButton component to display cart status and item count. - Implemented UserMenu with login/logout functionality and user greeting. - Added Badge component for notifications and status indicators. - Updated layout to accommodate new navigation components and ensure mobile responsiveness. - Created product detail demo page to showcase design patterns and features. - Enhanced existing components with improved styling and functionality.
25 lines
540 B
Vue
25 lines
540 B
Vue
<script setup lang="ts">
|
|
import { type HTMLAttributes, computed } from 'vue'
|
|
import { type BadgeVariants, badgeVariants } from '.'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
interface Props {
|
|
variant?: BadgeVariants['variant']
|
|
class?: HTMLAttributes['class']
|
|
}
|
|
|
|
const props = defineProps<Props>()
|
|
|
|
const delegatedProps = computed(() => {
|
|
const { class: _, ...delegated } = props
|
|
|
|
return delegated
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div :class="cn(badgeVariants({ variant }), props.class)" v-bind="delegatedProps">
|
|
<slot />
|
|
</div>
|
|
</template>
|