Skip to content

Commit

Permalink
adds right left alignment for both small and large thumbnail display
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanOXDi committed Aug 1, 2024
1 parent cbd105e commit 675d121
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/KCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
:headingStyles="headingStyles"
>
<template v-if="$slots.title" #title>
<!-- @slot Optional slot section containing the title contents, should not contain a heading element. -->
<slot name="title"></slot>
<div
data-test="title"
class="title"
>

<!-- @slot Optional slot section containing the title contents, should not contain a heading element. -->
<slot name="title"></slot>
</div>
</template>
<template #default>
<div class="thumbnail">
Expand Down Expand Up @@ -173,6 +179,10 @@
headingStyles: {
...headingCommonStyles,
width: `calc(60% - ${SPACER * 2}px)`,
marginRight:
this.thumbnailAlign === ThumbnailAlign.RIGHT
? `calc(40% + ${SPACER}px)`
: `${SPACER}px`,
},
thumbnailStyles: {
...thumbnailCommonStyles,
Expand All @@ -188,6 +198,10 @@
headingStyles: {
...headingCommonStyles,
width: `calc(70% - ${SPACER * 3}px)`,
marginLeft:
this.thumbnailAlign === ThumbnailAlign.LEFT
? `calc(30% + ${SPACER * 2}px)`
: `${SPACER}px`,
},
thumbnailStyles: {
...thumbnailCommonStyles,
Expand Down

0 comments on commit 675d121

Please sign in to comment.