Last active
January 10, 2019 19:26
-
-
Save eirikb/68519d44a7486b6cf77a976b46579260 to your computer and use it in GitHub Desktop.
Add MDL to Vue
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
<style lang="scss"> | |
@import "~material-design-lite/material.css"; | |
</style> |
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
import 'material-design-lite' | |
Vue.directive('mdl', { | |
inserted: el => componentHandler.upgradeElement(el) | |
}) |
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> | |
<button class="mdl-button mdl-js-button mdl-js-ripple-effect" v-mdl> | |
Hello, world! | |
</button> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment