Sha256: c016d0a5dc94a747af99fce88d6ab6356c927278d67641953c0b81586ed77917
Contents?: true
Size: 786 Bytes
Versions: 18
Compression:
Stored size: 786 Bytes
Contents
import {MDCSnackbar, MDCSnackbarFoundation} from '@material/snackbar'; import {VBaseComponent, hookupComponents} from './base-component'; export function initSnackbar(e) { console.debug('\tSnackbar'); hookupComponents(e, '.v-snackbar', VSnackbar, MDCSnackbar); } // This class displays a page level message export class VSnackbar extends VBaseComponent { constructor(element, mdcComponent) { super(element, mdcComponent); element.classList.remove('v-hidden'); // defer causes default snackbar to flash without this } display(message) { // const dataObj = { // message: message, // }; // this.mdcComponent.show(dataObj); this.mdcComponent.labelText = message; this.mdcComponent.open(); } }
Version data entries
18 entries across 18 versions & 2 rubygems