utrigg-form-embed-react
v0.9.0
Published
> This package is created to simplify the process of uTrigg form embedding within SPA application
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-react - Import package into needed component with command
import UtriggFormEmbedReact from 'utrigg-form-embed-react' - Place imported package into the template
- Provide prop
codewith embedding code from uTrigg platform if you are using "Full" version. - Provide prop
short-codewith embedding code from uTrigg platform and propaliaswith 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:
import UtriggFormEmbedReact from 'utrigg-form-embed-react'
const YourComponent = () => {
...
const codeFromUtrigg = `*here goes code from uTrigg platform*`
return (<UtriggFormEmbedReact code={codeFromUtrigg}/>)
...
}###Example for Full code embedding with 'Own button style' option:
...
const codeFromUtrigg = `*here goes code from uTrigg platform*`
const alias = `*Alias from utrigg platform*`
return (
<UtriggFormEmbedReact code={codeFromUtrigg} alias='alias'>
<button>Your own button</button>
</UtriggFormEmbedReact>
)
...###Example for Short code embedding:
...
const codeFromUtrigg = `*here goes code from uTrigg platform*`
const alias = `*Alias from utrigg platform*`
return (
<UtriggFormEmbedReact code={codeFromUtrigg} alias='alias' />
)
...