chore(toggle): update core toggle

This commit is contained in:
Adam Bradley
2017-05-17 22:34:15 +02:00
parent 10739ff2d7
commit 15375de61f
5 changed files with 14 additions and 11 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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 {

View File

@ -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;

View File

@ -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;
}