Last active
May 31, 2019 20:17
-
-
Save leetheguy/0d390f2e4864c6fdf9f613a9903b60ab to your computer and use it in GitHub Desktop.
This file contains 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 } from '@stencil/core'; | |
@Component({ | |
tag: 'analog-clock', | |
}) | |
export class AnalogClock { | |
get hour(): number { | |
let h: any = new Date().getHours(); | |
return h; | |
} | |
get minute(): number { | |
let m: any = new Date().getMinutes(); | |
return m; | |
} | |
get second(): number { | |
let s: any = new Date().getSeconds(); | |
return s; | |
} | |
render() { | |
return ( | |
<div> | |
<clock-face hour={this.hour} minute={this.minute} second={this.second}/> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment