fix(reorder): support for slot="start"

This commit is contained in:
Manuel Mtz-Almeida
2017-09-20 12:11:48 +02:00
parent bdf4f60e9e
commit 22c0ea5bcd
4 changed files with 3 additions and 15 deletions

View File

@ -17,16 +17,8 @@ import { ItemSliding } from '../item-sliding/item-sliding';
export class List {
@State() openContainer: ItemSliding;
@Prop() radioGroup: boolean;
render() {
if (this.radioGroup) {
return (
<ion-radio-group>
<slot></slot>
</ion-radio-group>
);
}
return <slot></slot>;
}

View File

@ -163,8 +163,6 @@ export class ReorderGroup {
/**
* @input {string} Which side of the view the ion-reorder should be placed. Default `"end"`.
*/
@Prop() side: string;
@PropDidChange('enabled')
enabledChanged(enabled: boolean) {
if (enabled) {
@ -330,8 +328,7 @@ export class ReorderGroup {
class: {
'reorder-enabled': this._enabled,
'reorder-list-active': this._actived,
'reorder-visible': this._iconVisible,
'reorder-side-start': this.side === 'start'
'reorder-visible': this._iconVisible
}
};
}

View File

@ -52,7 +52,7 @@ ion-reorder ion-icon {
pointer-events: none;
}
.reorder-side-start ion-reorder {
ion-reorder[slot="start"] {
@include transform(translate3d(-$reorder-initial-transform, 0, 0));
order: -1;

View File

@ -30,8 +30,7 @@
<ion-reorder slot="end"></ion-reorder>
</ion-item>
<ion-item>Item 3
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>
<ion-reorder slot="start"></ion-reorder>
</ion-item>
<ion-item>Item 4
<ion-icon reorderAnchor name="pizza" slot="end"></ion-icon>