feat: add sm2x avatar class #7813

v1.18.x
Barış Soner Uşaklı 6 years ago
parent b9583ed838
commit 35a4ca2fe9

@ -102,6 +102,12 @@
.user-icon-style(24px, 1.5rem);
}
&.avatar-sm2x {
width: 48px;
height: 48px;
.user-icon-style(48px, 1.5rem);
}
&.avatar-md {
width: 32px;
height: 32px;

@ -292,7 +292,7 @@
classNames = classNames || '';
// Validate sizes, handle integers, otherwise fall back to `avatar-sm`
if (['xs', 'sm', 'md', 'lg', 'xl'].includes(size)) {
if (['xs', 'sm', 'sm2x', 'md', 'lg', 'xl'].includes(size)) {
classNames += ' avatar-' + size;
} else if (!isNaN(parseInt(size, 10))) {
styles.push('width: ' + size + 'px;', 'height: ' + size + 'px;', 'line-height: ' + size + 'px;', 'font-size: ' + (parseInt(size, 10) / 16) + 'rem;');

Loading…
Cancel
Save