trakiframe
v0.0.24
Published
trakiframe
Downloads
12
Readme
Trak Iframe
About The Project
Trak Iframe focusing to embeded authorised way of showing websites inside a Iframe.
Getting Started
Trak Iframe
Installation
_Below is an example of how we can add trak iframe into your project.
- Install Trak Iframe Package
Using Npm
npm install trakiframe
Using Yarn
yarn add trakiframe
- Import Trak Iframe
orconst TrakComponent = require('trakiframe');
import * as Trak from 'trakiframe';
- Initialize Trak Iframe with Token
using
init
method
usingTrakComponent.init({ token: 'Token', })
init
method with publickey and token
or usingTrakComponent.init({ token: 'Token', publicKey: <---key----> })
init
method encrypting using package functionTrakComponent.init({ token: TrakComponent.encrypt(token), })
- Load iframe using
show
method eg: button ClickTrakComponent.show({...});
const mountComponent = () => { TrakComponent.show({ 'physiotherapist_name': 'fer', 'patient_name': 'qqqq', 'component': 'metrics', }) }
<button onClick={mountComponent}>Click</button>
- Remove iframe
using
remove
methodTrakComponent.remove();
In Angular style fix
Import styles from package to app
1.in Angular.json file projects -> demo -> architect -> build -> options -> styles
add
```json
"./node_modules/trakiframe/trakStyle.css"
```
License
Distributed under the MIT License. See LICENSE.txt
for more information.