aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/counter
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/counter')
-rw-r--r--src/components/counter/counter.tag13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/components/counter/counter.tag b/src/components/counter/counter.tag
new file mode 100644
index 0000000..d558e8e
--- /dev/null
+++ b/src/components/counter/counter.tag
@@ -0,0 +1,13 @@
+<counter>
+ <h3>Times clicked: { count }</h3>
+ <push-button />
+ <script>
+ this.count = 0;
+ const counter = this;
+
+ clicker.on('click', () => {
+ counter.count += 1;
+ counter.update();
+ });
+ </script>
+</counter> \ No newline at end of file