Skip to content

Commit dbf396b

Browse files
committed
fix(DashboardSection): omit unused DOM nodes
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
1 parent fba52c9 commit dbf396b

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/components/Dashboard/DashboardSection.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
<script lang="ts" setup>
77
import { useIsMobile, useIsSmallMobile } from '@nextcloud/vue/composables/useIsMobile'
88
9-
const { wide = false, title = '', subtitle = '', description = '' } = defineProps<{
9+
const { wide, title, subtitle, description } = defineProps<{
1010
wide?: boolean
11-
title?: string
11+
title: string
1212
subtitle?: string
1313
description?: string
1414
}>()
@@ -37,8 +37,8 @@ const isMobile = useIsMobile()
3737
<h3 class="dashboard-section__title">
3838
{{ title }}
3939
</h3>
40-
<span class="dashboard-section__subtitle">{{ subtitle }}</span>
41-
<span class="dashboard-section__description">{{ description }}</span>
40+
<span v-if="subtitle" class="dashboard-section__subtitle">{{ subtitle }}</span>
41+
<span v-if="description" class="dashboard-section__description">{{ description }}</span>
4242
<slot name="list" />
4343
<div v-if="$slots.action" class="dashboard-section__action">
4444
<slot name="action" />

0 commit comments

Comments
 (0)