File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ export class UUIAvatarElement extends LitElement {
15
15
display: inline-flex;
16
16
align-items: center;
17
17
justify-content: center;
18
+ flex-shrink: 0;
18
19
position: relative;
19
20
overflow: hidden;
20
21
border-radius: 50%;
Original file line number Diff line number Diff line change 1
- import { css , html , LitElement } from 'lit' ;
2
1
import { defineElement } from '@umbraco-ui/uui-base/lib/registration' ;
3
- import { property , query } from 'lit/decorators.js' ;
2
+ import { css , html , LitElement } from 'lit' ;
3
+ import { property } from 'lit/decorators.js' ;
4
4
import { styleMap } from 'lit/directives/style-map.js' ;
5
5
6
6
/**
@@ -90,6 +90,9 @@ export class UUILoaderCircleElement extends LitElement {
90
90
font-size: 0.3em;
91
91
font-weight: 700;
92
92
text-align: center;
93
+
94
+ /* Center the text */
95
+ padding-top: 0.09em;
93
96
}
94
97
` ,
95
98
] ;
@@ -120,22 +123,19 @@ export class UUILoaderCircleElement extends LitElement {
120
123
@property ( { type : Boolean , reflect : true , attribute : 'show-progress' } )
121
124
showProgress = false ;
122
125
123
- @query ( '#svg-container' )
124
- private _container : any ;
125
-
126
126
private _resizeObserver = new ResizeObserver ( ( ) => this . onResize ( ) ) ;
127
127
private _isLarge = false ;
128
128
129
129
firstUpdated ( ) {
130
- this . _resizeObserver . observe ( this . _container ) ;
130
+ this . _resizeObserver . observe ( this ) ;
131
131
}
132
132
133
133
disconnectedCallback ( ) {
134
134
this . _resizeObserver . disconnect ( ) ;
135
135
}
136
136
137
137
onResize ( ) {
138
- const newIsLarge = Number . parseFloat ( this . _container . clientHeight ) >= 30 ;
138
+ const newIsLarge = this . clientHeight >= 30 ;
139
139
140
140
if ( this . _isLarge != newIsLarge ) {
141
141
this . _isLarge = newIsLarge ;
You can’t perform that action at this time.
0 commit comments