feat(toggle): expose label wrapper as shadow part (#28585)

This commit is contained in:
Liam DeBeasi
2023-11-30 14:03:51 -05:00
committed by GitHub
parent 52ed2bf637
commit a34188f7db
4 changed files with 16 additions and 7 deletions

View File

@ -23,6 +23,7 @@ import type { ToggleChangeEventDetail } from './toggle-interface';
*
* @part track - The background track of the toggle.
* @part handle - The toggle handle, or knob, used to change the checked state.
* @part label - The label text describing the toggle.
*/
@Component({
tag: 'ion-toggle',
@ -377,6 +378,7 @@ export class Toggle implements ComponentInterface {
'label-text-wrapper': true,
'label-text-wrapper-hidden': !this.hasLabel,
}}
part="label"
>
<slot></slot>
</div>