Skip to content

Commit

Permalink
Added some logic to keep borderRadius
Browse files Browse the repository at this point in the history
  • Loading branch information
spoorthy madasu authored and spoorthy madasu committed Aug 26, 2024
1 parent f4752af commit f693a2c
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions lib/KCard/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -266,21 +266,20 @@
width: '100%',
height: '100%',
};
if (this.layout === 'vertical' && this.thumbnailDisplay === 'large') {
return {
rootClass: 'vertical-with-large-thumbnail',
thumbnailAlignClass: undefined,
thumbnailAspectRatio: undefined,
headingStyles: {
...headingCommonStyles,
},
thumbnailStyles: {
...thumbnailCommonStyles,
borderRadius: '8px 8px 0 0',
},
};
}
return {
rootClass: 'vertical-with-large-thumbnail',
thumbnailAlignClass: undefined,
thumbnailAspectRatio: undefined,
headingStyles: {
...headingCommonStyles,
},
thumbnailStyles: {
...thumbnailCommonStyles,
borderRadius: '8px 8px 0 0',
},
};
}
if (this.layout === 'vertical' && this.thumbnailDisplay === 'small') {
return {
rootClass: 'vertical-with-small-thumbnail',
Expand Down Expand Up @@ -316,11 +315,11 @@
thumbnailAspectRatio: undefined,
headingStyles: {
...headingCommonStyles,
width: `calc(60% - ${SPACER * 2}px)` /* same as slots width defined in styles */,
width: `calc(60% - ${SPACER * 2}px)`, // same as slots width defined in styles
},
thumbnailStyles: {
...thumbnailCommonStyles,
borderRadius: '0 8px 8px 0',
borderRadius: this.thumbnailAlign === 'right' ? '0 8px 8px 0' : '8px 0 0 8px',
},
};
}
Expand Down

0 comments on commit f693a2c

Please sign in to comment.