Skip to content

Instantly share code, notes, and snippets.

@AnandShiva
AnandShiva / App.vue
Created July 6, 2020 11:33
Importing and registering a component in sample consumption project
<template>
<div id="app">
<my-button text='Hello Vue Expert !'>
</my-button>
</div>
</template>
<script>
// const libCss = require('vue-library-demo-medium/dist/cssfile.css')
import vueLibrary from 'vue-library-demo-medium';
@AnandShiva
AnandShiva / main.js
Created June 20, 2020 11:50
code sample to updated in /src/main.js
// code sample to updated in /src/main.js
import Button from './components/Button.vue';
const components = {
myButton: Button
}
export default components
@AnandShiva
AnandShiva / button.vue
Last active June 21, 2020 11:04
Button.vue example component
// src/components/button.vue eg
<template>
<button class="button" @click="buttonClicked">{{text}}</button>
</template>
<script>
export default {
props:{
text:{
type: String,