Skip to content

Commit

Permalink
fix(VCard): only render subtitle component slot or prop present
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed Feb 28, 2022
1 parent 954a4c3 commit 500c71d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions packages/vuetify/src/components/VCard/VCard.tsx
@@ -1,3 +1,5 @@
/* eslint-disable complexity */

// Styles
import './VCard.sass'

Expand Down Expand Up @@ -155,12 +157,14 @@ export const VCard = defineComponent({
</VCardTitle>
) }

<VCardSubtitle>
{ slots.subtitle
? slots.subtitle()
: props.subtitle
}
</VCardSubtitle>
{ hasSubtitle && (
<VCardSubtitle>
{ slots.subtitle
? slots.subtitle()
: props.subtitle
}
</VCardSubtitle>
) }
</VCardHeaderText>
) }

Expand Down

0 comments on commit 500c71d

Please sign in to comment.