File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ export class IAComboBoxStory extends LitElement {
172172 ?dis abled= ${ this . disabled }
173173 @change = ${ this . handleComboBoxChange }
174174 >
175- ${ this . label }
175+ <span slot = "label" > ${ this . label } < / span >
176176 </ ia- combo- box>
177177 <div id= "announcer" > ${ this . announcerText } </ div>
178178 </ div>
@@ -320,7 +320,9 @@ export class IAComboBoxStory extends LitElement {
320320 ...
321321 ]}
322322 ${ bindingsStr }
323- >${ this . label } </ia-combo-box>
323+ >
324+ <span slot="label">${ this . label } </span>
325+ </ia-combo-box>
324326 `
325327 . replace ( / \n \s * \n / g, '\n' )
326328 . replace ( / \n { 6 } / g, '\n' ) ;
Original file line number Diff line number Diff line change @@ -379,10 +379,14 @@ export class IAComboBox extends LitElement {
379379 /**
380380 * Template for the main label for the combo box.
381381 *
382- * Uses the contents of the default (unnamed) slot as the label text.
382+ * Uses the contents of the `label` named slot as the label text.
383383 */
384384 private get labelTemplate ( ) : TemplateResult {
385- return html `<label id= "label" for = "text- input"> <slot> </ slot> </ label> ` ;
385+ return html `
386+ <label id= "label" for = "text- input">
387+ <slot name= "label" > </ slot>
388+ </ label>
389+ ` ;
386390 }
387391
388392 /**
You can’t perform that action at this time.
0 commit comments