forked from BRETT/BRETT
22 lines
812 B
Vue
22 lines
812 B
Vue
<script setup lang="ts">
|
|
import type { HTMLAttributes } from 'vue'
|
|
import { cn } from '@/lib/utils'
|
|
|
|
const props = withDefaults(defineProps<{
|
|
class?: HTMLAttributes['class']
|
|
size?: 'default' | 'sm'
|
|
}>(), {
|
|
size: 'default',
|
|
})
|
|
</script>
|
|
|
|
<template>
|
|
<div
|
|
data-slot="card"
|
|
:data-size="size"
|
|
:class="cn('bg-card text-card-foreground ring-foreground/5 dark:ring-foreground/10 gap-(--card-spacing) overflow-hidden rounded-[min(var(--radius-4xl),24px)] py-(--card-spacing) text-sm shadow-sm ring-1 [--card-spacing:--spacing(5)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(4)] *:[img:first-child]:rounded-t-[min(var(--radius-4xl),24px)] *:[img:last-child]:rounded-b-[min(var(--radius-4xl),24px)] group/card flex flex-col', props.class)"
|
|
>
|
|
<slot />
|
|
</div>
|
|
</template>
|