File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed
Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,6 @@ styles.field {
66}
77
88styles .field > label {
9- font-size : 12 px ;
9+ font-size : ${ labelFontSize } ;
1010 color : ${labelColor || $swatches.grey .p500 };
1111}
Original file line number Diff line number Diff line change @@ -6,4 +6,5 @@ export class UxFieldTheme {
66 public foreground : string ;
77
88 public labelColor : string = '#444' ;
9+ public labelFontSize : string = '12px' ;
910}
Original file line number Diff line number Diff line change @@ -24,9 +24,12 @@ export class UxField implements Themable {
2424 if ( this . theme ) {
2525 this . styleEngine . applyTheme ( this , this . theme ) ;
2626 }
27+ }
2728
28- if ( this . label && ! this . element . closest ( 'label' ) ) {
29+ public attached ( ) {
30+ if ( this . label && ! this . element . querySelector ( 'label' ) ) {
2931 const newLabel = document . createElement ( 'label' ) ;
32+
3033 newLabel . textContent = this . label ;
3134
3235 this . element . insertBefore ( newLabel , this . element . firstChild ) ;
You can’t perform that action at this time.
0 commit comments