Created
February 4, 2016 16:21
-
-
Save martinlindhe/8be3cbe036d5582eba15 to your computer and use it in GitHub Desktop.
<mdl-snackbar> from mdl 1.1, for vue-mdl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mdl-snackbar message="hello world"></mdl-snackbar> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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