docs(): usage and examples

This commit is contained in:
mhartington
2018-06-18 12:45:06 -04:00
parent 518594bcc4
commit 96945b1ee1
66 changed files with 809 additions and 604 deletions

View File

@ -4,10 +4,8 @@ The Slides component is a multi-section container. Each section can be swiped
or dragged between. It contains any number of [Slide](../Slide) components.
```
Adopted from Swiper.js:
The most modern mobile touch slider and framework with
hardware accelerated transitions.
The most modern mobile touch slider and framework with hardware accelerated transitions.
http://www.idangero.us/swiper/
@ -16,7 +14,6 @@ The iDangero.us
http://www.idangero.us/
Licensed under MIT
```
<!-- Auto Generated Below -->

View File

@ -1,12 +1,4 @@
import {
Component,
Element,
Event,
EventEmitter,
Method,
Prop,
Watch
} from '@stencil/core';
import { Component, Element, Event, EventEmitter, Method, Prop, Watch } from '@stencil/core';
import { Swiper } from './vendor/swiper.js';
@Component({
tag: 'ion-slides',

View File

@ -0,0 +1,26 @@
```typescript
import { Component } from '@angular/core';
@Component({
selector: 'slides-example',
template: `
<ion-slides pager="true" [options]="slideOpts">
<ion-slide>
<h1>Slide 1</h1>
</ion-slide>
<ion-slide>
<h1>Slide 2</h1>
</ion-slide>
<ion-slide>
<h1>Slide 3</h1>
</ion-slide>
</ion-slides>
`
})
export class SlideExample {
slideOpts = {
effect: 'flip'
};
constructor() {}
}
```

View File

@ -0,0 +1,23 @@
```html
<ion-slides pager="true">
<ion-slide>
<h1>Slide 1</h1>
</ion-slide>
<ion-slide>
<h1>Slide 2</h1>
</ion-slide>
<ion-slide>
<h1>Slide 3</h1>
</ion-slide>
</ion-slides>
```
```javascript
var slides = document.querySelector('ion-slides');
slides.options = {
effect: 'flip'
}
```