Skip to content

Commit

Permalink
Center placeholder content by default
Browse files Browse the repository at this point in the history
  • Loading branch information
MisRob committed Sep 24, 2024
1 parent 619ff8c commit cc9ca8a
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
10 changes: 4 additions & 6 deletions docs/pages-components/DocsKCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
<slot name="thumbnailPlaceholder"></slot>
</template>
<template v-else #thumbnailPlaceholder>
<span :style="{ height: '100%', display: 'flex', justifyContent: 'center', alignItems: 'center' }">
<KIcon
:style="{ fontSize: '48px' }"
icon="readSolid"
/>
</span>
<KIcon
:style="{ fontSize: '48px' }"
icon="readSolid"
/>
</template>

<template v-if="$slots.aboveTitle" #aboveTitle>
Expand Down
10 changes: 4 additions & 6 deletions docs/pages/kcard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -513,12 +513,10 @@
<KCardGrid ...>
<KCard ...>
<template #thumbnailPlaceholder>
<span :style="{ display: 'flex', height: '100%', justifyContent: 'center', alignItems: 'center' }">
<KIcon
:style="{ fontSize: '48px' }"
icon="readSolid"
/>
</span>
<KIcon
:style="{ fontSize: '48px' }"
icon="readSolid"
/>
</template>
</KCard>
</KCardGrid>
Expand Down
4 changes: 4 additions & 0 deletions lib/cards/KCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -587,6 +587,10 @@
bottom: 0;
left: 0;
z-index: 0; /* <img> in KImg with z-index 1 should cover the placeholder after loaded */
display: flex;
align-items: center;
justify-content: center;
height: 100%;
}
.link {
Expand Down

0 comments on commit cc9ca8a

Please sign in to comment.