Created
February 25, 2018 09:17
-
-
Save AhsanAyaz/c3fa8d277719f549df21c3a3d3e4eec3 to your computer and use it in GitHub Desktop.
Stop Watch Component built with Stencil
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, Prop } from "@stencil/core"; | |
@Component({ | |
tag: "stop-watch", | |
styleUrl: "stop-watch.css" | |
}) | |
export class StopWatchComponent { | |
@Prop() hours: string; | |
@Prop() minutes: string; | |
@Prop() seconds: string; | |
@Prop() milliseconds: string; | |
render() { | |
return ( | |
<div class="watch-wrapper"> | |
<div class="watch"> | |
<div class="unit">{this.hours}</div> | |
<div class="sep"> : </div> | |
<div class="unit">{this.minutes}</div> | |
<div class="sep"> : </div> | |
<div class="unit">{this.seconds}</div> | |
<div class="sep"> : </div> | |
<div class="unit">{this.milliseconds}</div> | |
</div> | |
</div> | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment