0.0.9 • Published 2 years ago
trakiframetest v0.0.9
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 trakiframeUsing Yarn
yarn add trakiframe - Import Trak Iframe
orconst TrakComponent = require('trakiframe');import * as Trak from 'trakiframe'; - Initialize Trak Iframe with Token
using
initmethod
usingTrakComponent.init({ token: 'Token', })initmethod with publickey and token
or usingTrakComponent.init({ token: 'Token', publicKey: <---key----> })initmethod encrypting using package functionTrakComponent.init({ token: TrakComponent.encrypt(token), }) - Load iframe using
showmethod eg: button ClickTrakComponent.show({...});const mountComponent = () => { TrakComponent.show({ 'physiotherapist_name': 'fer', 'patient_name': 'qqqq', 'component': 'metrics', }) }<button onClick={mountComponent}>Click</button> - Remove iframe
using
removemethodTrakComponent.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.