From 1181fe98fc8cb84bc92fea20fd81b4b40ec6f746 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Fri, 16 Jun 2017 14:47:27 -0500 Subject: [PATCH] feat(button): add ion-buttons --- src/components/buttons/buttons.tsx | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/components/buttons/buttons.tsx diff --git a/src/components/buttons/buttons.tsx b/src/components/buttons/buttons.tsx new file mode 100644 index 0000000000..6e18afaf52 --- /dev/null +++ b/src/components/buttons/buttons.tsx @@ -0,0 +1,24 @@ +import { Component, h } from '../index'; + + +@Component({ + tag: 'ion-buttons', + host: { + theme: 'bar-buttons' + } +}) +export class Buttons { + $el: HTMLElement; + + ionViewWillLoad() { + // Add bar-button classes to each ion-button + const buttons = this.$el.querySelectorAll('ion-button') as any; + for (var i = 0; i < buttons.length; i++) { + buttons[i].setAttribute('button-type', 'bar-button'); + } + } + + render() { + return ; + } +}