utrigg-form-embed-vue
v1.0.4
Published
> This package is created to simplify the process of uTrigg form embedding within SPA application
Downloads
3
Readme
This package is created to simplify the process of uTrigg form embedding within SPA application
Guide
- Install package via command
npm install utrigg-form-embed-vue
- Import package into needed component with command
import utriggFormEmbedVue from 'utrigg-form-embed-vue'
- Place imported package into the template
- Provide prop
:code
with embedding code from uTrigg platform if you are using "Full" version. - Provide prop
:short-code
with embedding code from uTrigg platform and prop:alias
with form alias from uTrigg platform if you are using "Short" version. - For an accurate 'Own button style' option handling watch examples below
###Basic Example for Full code embedding:
<template>
<utriggFormEmbedVue :code='codeFromUtrigg' />
<template>
<script>
import utriggFormEmbedVue from 'utrigg-form-embed-vue'
export default {
components: {
utriggFormEmbedVue
},
data () {
return {
codeFromUtrigg: `*here goes code from uTrigg platform*`
};
},
...
</script>
###Example for Full code embedding with 'Own button style' option:
<template>
<utriggFormEmbedVue :code='codeFromUtrigg' :alias='alias'>
<button>Your own button</button>
</utriggFormEmbedVue>
<template>
...
###Example for Short code embedding:
<template>
<utriggFormEmbedVue :code='codeFromUtrigg' :alias='aliasFromUtrigg' />
<template>
...
###Example for Short code embedding with 'Own button style' option
<template>
<utriggFormEmbedVue :code='codeFromUtrigg' :alias='aliasFromUtrigg'>
<button>Your own button</button>
</utriggFormEmbedVue>
<template>
...