docs(breaking): update breaking changes to include item sliding markup

This commit is contained in:
Brandy Carney
2018-02-09 22:41:30 -05:00
parent 5ed6c71888
commit 2f32ecc15a

View File

@@ -470,6 +470,40 @@ The `menuToggle` attribute should not be added to an element anymore. Elements t
## Item Sliding
### Markup Changed
The option component should not be written as a `button` with an `ion-button` directive anymore. It should be written as an `ion-item-option`. This will render a native button element inside of it.
**Old Usage Example:**
```html
<ion-item-sliding>
<ion-item>
Item 1
</ion-item>
<ion-item-options side="right">
<button ion-button expandable>
<ion-icon name="star"></ion-icon>
</button>
</ion-item-options>
</ion-item-sliding>
```
**New Usage Example:**
```html
<ion-item-sliding>
<ion-item>
<ion-label>Item 1</ion-label>
</ion-item>
<ion-item-options side="right">
<ion-item-option expandable>
<ion-icon name="star"></ion-icon>
</ion-item-option>
</ion-item-options>
</ion-item-sliding>
```
### Method Renamed
The `getSlidingPercent` method has been renamed to `getSlidingRatio` since the function is returning a ratio of the open amount of the item compared to the width of the options.