feat: Support square variants of thumbnail and avatar components (#5003)
This commit is contained in:
parent
43f46e96d4
commit
b9eb9a5e48
3 changed files with 78 additions and 2 deletions
|
@ -40,13 +40,18 @@ export default {
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'circle',
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
style() {
|
||||
let style = {
|
||||
width: `${this.size}px`,
|
||||
height: `${this.size}px`,
|
||||
borderRadius: this.rounded ? '50%' : 0,
|
||||
borderRadius:
|
||||
this.variant === 'square' ? 'var(--border-radius-large)' : '50%',
|
||||
lineHeight: `${this.size + Math.floor(this.size / 20)}px`,
|
||||
fontSize: `${Math.floor(this.size / 2.5)}px`,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue