Added control--checked and control--indeterminate parts to <sl-checkbox> (#1085)

* removed checked and indeterminate parts from doc

* Revert "removed checked and indeterminate parts from doc"

This reverts commit 5e702387e1.

* control--checked & control--indeterminate parts
This commit is contained in:
Bünyamin Eskiocak
2022-12-29 00:40:59 +03:00
committed by GitHub
parent a8fe8c3e71
commit a4c522f090

View File

@@ -184,7 +184,10 @@ export default class SlCheckbox extends ShoelaceElement implements ShoelaceFormC
@focus=${this.handleFocus}
/>
<span part="control" class="checkbox__control">
<span
part="control${this.checked ? ' control--checked' : ''}${this.indeterminate ? ' control--indeterminate' : ''}"
class="checkbox__control"
>
${this.checked
? html`
<sl-icon part="checked-icon" class="checkbox__checked-icon" library="system" name="check"></sl-icon>