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