Skip to content

Commit

Permalink
chore(checkbox): render either text or slot
Browse files Browse the repository at this point in the history
  • Loading branch information
annawen1 committed Dec 15, 2023
1 parent d990e2d commit 63209a4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ class CDSCheckbox extends FocusMixin(FormMixin(LitElement)) {
part="label"
class="${labelClasses}"
title="${ifDefined(title)}">
<span class="${labelTextClasses}"><slot>${labelText}</slot></span>
<span class="${labelTextClasses}"
>${labelText ? labelText : html`<slot></slot>`}</span
>
</label>
<slot name="slug" @slotchange="${this._handleSlotChange}"></slot>
<div class="${prefix}--checkbox__validation-msg">
Expand Down

0 comments on commit 63209a4

Please sign in to comment.