feat(button): add ion-buttons

This commit is contained in:
Adam Bradley
2017-06-16 14:47:27 -05:00
parent 62cd0f6dac
commit 1181fe98fc

View File

@ -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 <slot></slot>;
}
}