Installation
to install the library
pnpm
pnpm add thaff-embed-scripts
yarn
yarn add thaff-embed-scripts
npm
npm i thaff-embed-scripts
Integration
bundler
import {Loader} from 'thaff-embed-scripts';
import 'thaff-embed-scripts/dist/thaff-embed-scripts.css'
const loader = new Loader({
key: '{key}',
})
esm
<script type="module" src="thaff-embed-scripts.js"></script>
<script type="module">
import {Loader} from './thaff-embed-scripts.js';
const loader = new Loader({
key: '{key}',
})
</script>
common JS
<script src="thaff-embed-scripts.umd.cjs"></script>
<script>
// Loader is globally available
const loader = new Thaff.Loader({
key: '{key}',
})
</script>
Services
Currently there are two available services