Last active
May 31, 2019 20:16
-
-
Save leetheguy/16b46c4074e660c2ab35aae372f3ca35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, Prop, Event, EventEmitter } from '@stencil/core'; | |
| import '@ionic/core'; | |
| @Component({ | |
| tag: 'time-zone-slider' | |
| }) | |
| export class TimeZoneSlider { | |
| @Prop() offset: number; | |
| @Event() timeZoneChanged: EventEmitter; | |
| positionChanged(event: CustomEvent) { | |
| this.timeZoneChanged.emit(event.detail.value) | |
| } | |
| render() { | |
| return ( | |
| <ion-range | |
| debounce={500} | |
| max={12} | |
| min={-12} | |
| pin={true} | |
| snaps={true} | |
| step={1} | |
| value={this.offset} | |
| onIonChange={event => this.positionChanged(event)} | |
| > | |
| <ion-label slot="start">-12</ion-label> | |
| <ion-label slot="end">12</ion-label> | |
| </ion-range> | |
| ); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment