fix(theme): allow wrapping feature icons

closes #2923
pull/2937/head
Divyansh Singh 2 years ago
parent b277beb003
commit a1e1267549

@ -25,8 +25,16 @@ defineProps<{
:tag="link ? 'a' : 'div'"
>
<article class="box">
<div v-if="typeof icon === 'object' && icon.wrap" class="icon">
<VPImage
v-if="typeof icon === 'object'"
:image="icon"
:alt="icon.alt"
:height="icon.height || 48"
:width="icon.width || 48"
/>
</div>
<VPImage
v-else-if="typeof icon === 'object'"
:image="icon"
:alt="icon.alt"
:height="icon.height || 48"
@ -66,7 +74,7 @@ defineProps<{
height: 100%;
}
.VPFeature:deep(.VPImage) {
.box > :deep(.VPImage) {
margin-bottom: 20px;
}

@ -190,13 +190,20 @@ export namespace DefaultTheme {
export type FeatureIcon =
| string
| { src: string; alt?: string; width?: string; height: string }
| {
src: string
alt?: string
width?: string
height?: string
wrap?: boolean
}
| {
light: string
dark: string
alt?: string
width?: string
height: string
height?: string
wrap?: boolean
}
// sidebar -------------------------------------------------------------------

Loading…
Cancel
Save