mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-18 19:21:34 +08:00
feat(toggle): add parts support for handle, track (#20962)
This commit is contained in:
@ -8,6 +8,9 @@ import { createColorClasses, hostContext } from '../../utils/theme';
|
||||
|
||||
/**
|
||||
* @virtualProp {"ios" | "md"} mode - The mode determines which platform styles to use.
|
||||
*
|
||||
* @part track - The background track of the toggle.
|
||||
* @part handle - The toggle handle, or knob, used to change the checked state.
|
||||
*/
|
||||
@Component({
|
||||
tag: 'ion-toggle',
|
||||
@ -200,8 +203,8 @@ export class Toggle implements ComponentInterface {
|
||||
'interactive': true
|
||||
}}
|
||||
>
|
||||
<div class="toggle-icon">
|
||||
<div class="toggle-inner"/>
|
||||
<div class="toggle-icon" part="track">
|
||||
<div class="toggle-inner" part="handle" />
|
||||
</div>
|
||||
<button
|
||||
type="button"
|
||||
|
Reference in New Issue
Block a user