Vue.js single file components for Vonage Volta authored with vue-loader
- Create a branch from the develop branch
- Make your changes and commit to your branch
- Create a pull request to merge your branch to develop
- Create one branch per feature/fix
- Branches should be deleted after being merged in to develop
npm install @vonagevolta/vue
Set the font variable value before loading the volta style sheet
$Vlt-font-url: '~@vonagevolta/core/fonts/';
@import '~@vonagevolta/core/scss/volta';
Icons have a dependency on svg-sprite-loader
npm install svg-sprite-loader --save-dev
Webpack config
{
test: /\.svg$/,
loader: 'svg-sprite-loader',
options: {
symbolId: 'V'
}
}
App.vue
import VoltaIcons from '@vonagevolta/core/dist/symbol/volta-icons.svg';
...
data () {
return {
VoltaIcons
}
}
In your vue component
<template>
<vlt-icon icon="help" />
</template>
<script>
import { VltIcon } from '@vonagevolta/vue';
export default {
components: {
VltIcon
}
...
}
</script>
We use Vue Test Utils with Jest for unit testing. You can run all the tests:
npm test
Or a single test:
npm test test/radio/VltRadio.spec.js
Clone repo
npm run dev