Skip to content

Instantly share code, notes, and snippets.

@martinlindhe
Created February 4, 2016 16:21
Show Gist options
  • Save martinlindhe/8be3cbe036d5582eba15 to your computer and use it in GitHub Desktop.
Save martinlindhe/8be3cbe036d5582eba15 to your computer and use it in GitHub Desktop.
<mdl-snackbar> from mdl 1.1, for vue-mdl
<mdl-snackbar message="hello world"></mdl-snackbar>
<template>
<div aria-live="assertive" aria-atomic="true" aria-relevant="text" class="mdl-snackbar mdl-js-snackbar">
<div class="mdl-snackbar__text"></div>
<button class="mdl-snackbar__action" type="button"></button>
</div>
</template>
<script>
export default {
props: {
message: '',
},
ready() {
componentHandler.upgradeElement(this.$el);
this.$el.MaterialSnackbar.showSnackbar({message: this.message});
},
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment