mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 17:30:37 +01:00
fix(Card): missing slots definition
This commit is contained in:
@@ -13,6 +13,12 @@ export interface CardProps extends Omit<PrimitiveProps, 'asChild'> {
|
|||||||
class?: any
|
class?: any
|
||||||
ui?: Partial<typeof card.slots>
|
ui?: Partial<typeof card.slots>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface CardSlots {
|
||||||
|
header(): any
|
||||||
|
default(): any
|
||||||
|
footer(): any
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -20,6 +26,7 @@ import { computed } from 'vue'
|
|||||||
import { Primitive } from 'radix-vue'
|
import { Primitive } from 'radix-vue'
|
||||||
|
|
||||||
const props = withDefaults(defineProps<CardProps>(), { as: 'div' })
|
const props = withDefaults(defineProps<CardProps>(), { as: 'div' })
|
||||||
|
defineSlots<CardSlots>()
|
||||||
|
|
||||||
const ui = computed(() => tv({ extend: card, slots: props.ui })())
|
const ui = computed(() => tv({ extend: card, slots: props.ui })())
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user