You must install the package first ```sh npm i --save @subiz/campaign-template ``` Then, import the package ```js import CampTemp from '@subiz/campaign-template`
npm install @subiz/campaign-templatesh
npm i --save @subiz/campaign-template
`
Then, import the package
`js
import CampTemp from '@subiz/campaign-templatelet template = CampTemp.New()
// call each time you need to render or change the parameter
template.render('#pop', {
template: template,
page: page,
select: 'secondary_button',
onClick: () => true,
onClose: () => true,
})
// to close the template
template.close()
// reset the template to the original state
template.reset()
``
sh
npm run build
`Start dev server for development
`sh
npm run dev
`Visit
localhost:8081#template1 to test template 1, visit localhost:8081#template2 to test template 2, ...To run report
Uncomment the line in ./webpack.config.js`