views/mdc/assets/js/components/button.js in voom-presenters-0.1.13 vs views/mdc/assets/js/components/button.js in voom-presenters-0.2.0

- old
+ new

@@ -1,15 +1,8 @@ import {MDCRipple} from '@material/ripple'; +import {VBaseComponent} from "./base-component"; +import {hookupComponents} from "./base-component"; export function initButtons() { console.log('\tButtons'); - - var rippleButtons = document.querySelectorAll('.v-js-ripple-button'); - if(rippleButtons) { - for (var i = 0; i < rippleButtons.length; i++) { - var button = rippleButtons[i]; - if(!button.mdcComponent) { - button.mdcComponent = new MDCRipple(button); - } - } - } + hookupComponents('.v-js-ripple-button', VBaseComponent, MDCRipple); }