Skip to content

Commit

Permalink
Add border radius
Browse files Browse the repository at this point in the history
  • Loading branch information
MisRob committed Jan 12, 2024
1 parent efce7f3 commit bf98767
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions lib/KImg.vue
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@
required: false,
default: null,
},
/**
* The border radius of an image or its placeholder area
* as a standard CSS 'border-radius' value.
*/
borderRadius: {
type: String,
required: false,
default: null,
},
},
computed: {
ratio() {
Expand All @@ -202,12 +211,15 @@
const backgroundColor = this.backgroundColor
? this.backgroundColor
: this.$themePalette.grey.v_200;
const borderRadius = this.borderRadius ? this.borderRadius : 0;
return {
rootContainer: {
display: 'block',
position: 'relative',
backgroundColor,
borderRadius,
overflow: 'hidden',
height: this.validateAndFormatUnits(this.height),
width: this.validateAndFormatUnits(this.width),
maxHeight: this.validateAndFormatUnits(this.maxHeight),
Expand Down

0 comments on commit bf98767

Please sign in to comment.