Skip to content

Commit a477590

Browse files
committed
fix: NqGrid renders with slot even without cards
1 parent 314712c commit a477590

File tree

1 file changed

+1
-1
lines changed
  • packages/nimiq-vitepress-theme/src/components

1 file changed

+1
-1
lines changed

packages/nimiq-vitepress-theme/src/components/NqGrid.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function getSpan({ span, bgColor }: NqCardInGrid): CardSpan | undefined {
1616
</script>
1717

1818
<template>
19-
<ul v-if="cards.length > 0" grid="~ cols-2 md:cols-6 gap-8 md:gap-16" class="nq-grid nq-raw" f-my-md>
19+
<ul v-if="cards.length > 0 || $slots.default" grid="~ cols-2 md:cols-6 gap-8 md:gap-16" class="nq-grid nq-raw" f-my-md>
2020
<slot>
2121
<li v-for="(card, index) in cards" :key="index" :data-span="getSpan(card)">
2222
<component :is="largeCards ? NqLargeCard : NqCard" v-bind="card" />

0 commit comments

Comments
 (0)