mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-22 21:48:42 +08:00
chore(toggle): update core toggle
This commit is contained in:
@ -202,7 +202,7 @@ $toggle-ios-item-right-padding: 6px ($item-ios-padding-right / 2) 5px ($i
|
||||
padding: $toggle-ios-item-right-padding;
|
||||
}
|
||||
|
||||
.item-ios .toggle-ios[item-left] {
|
||||
.item-ios .toggle-ios[slot="start"] {
|
||||
padding: $toggle-ios-item-left-padding;
|
||||
}
|
||||
|
||||
|
@ -160,7 +160,7 @@ $toggle-md-item-right-padding: 12px ($item-md-padding-right / 2) 12px
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item-md .toggle-md[item-left] {
|
||||
.item-md .toggle-md[slot="start"] {
|
||||
padding: $toggle-md-item-left-padding;
|
||||
}
|
||||
|
||||
|
@ -4,16 +4,19 @@
|
||||
// Toggle
|
||||
// --------------------------------------------------
|
||||
|
||||
ion-toggle,
|
||||
:host {
|
||||
ion-toggle {
|
||||
display: inline-block;
|
||||
visibility: inherit !important;
|
||||
|
||||
contain: content;
|
||||
}
|
||||
|
||||
ion-gesture {
|
||||
ion-toggle.upgraded {
|
||||
visibility: inherit;
|
||||
}
|
||||
|
||||
ion-toggle ion-gesture {
|
||||
display: block;
|
||||
visibility: inherit !important;
|
||||
visibility: inherit;
|
||||
}
|
||||
|
||||
.toggle-cover {
|
||||
|
@ -1,5 +1,5 @@
|
||||
import { BooleanInputComponent, GestureDetail } from '../../util/interfaces';
|
||||
import { Component, h, Ionic, Listen, Method, Prop, Watch } from '../index';
|
||||
import { Component, h, Ionic, Listen, Prop, Watch } from '../index';
|
||||
|
||||
|
||||
@Component({
|
||||
@ -8,7 +8,8 @@ import { Component, h, Ionic, Listen, Method, Prop, Watch } from '../index';
|
||||
ios: 'toggle.ios.scss',
|
||||
md: 'toggle.md.scss',
|
||||
wp: 'toggle.wp.scss'
|
||||
}
|
||||
},
|
||||
shadow: false
|
||||
})
|
||||
export class Toggle implements BooleanInputComponent {
|
||||
activated: boolean;
|
||||
@ -78,7 +79,6 @@ export class Toggle implements BooleanInputComponent {
|
||||
ev.preventDefault();
|
||||
}
|
||||
|
||||
@Method()
|
||||
toggle() {
|
||||
if (!this.disabled) {
|
||||
this.checked = !this.checked;
|
||||
|
@ -168,7 +168,7 @@ $toggle-wp-item-right-padding: 12px ($item-wp-padding-right / 2) 12px
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.item-wp .toggle-wp[item-left] {
|
||||
.item-wp .toggle-wp[slot="start"] {
|
||||
padding: $toggle-wp-item-left-padding;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user