mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 11:17:19 +08:00
feat(toggle): expose label wrapper as shadow part (#28585)
This commit is contained in:
@ -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>
|
||||
|
Reference in New Issue
Block a user