0.2.0 • Published 7 months ago
@safehello/web-elements v0.2.0
SafeHello - Web Elements
Use this library to render SafeHello screens in your Website or WebView.
Usage
1 - Installing library
npm install @safehello/web-elements
2 - Loading assets
<head>
<link rel="stylesheet" href="node_modules/@safehello/web-elements/safehello-elements.css" />
<script src="node_modules/@safehello/web-elements/safehello-elements.js"></script>
</head>
3 - Using components
<body>
<safehello-host user-id="xxx" event-id="xxx" user-token="xxx">
<safehello-escrow slot="escrow"></safehello-escrow>
<safehello-signal slot="signal"></safehello-signal>
<safehello-mark slot="mark"></safehello-mark>
<safehello-verified slot="verified"></safehello-verified>
</safehello-host>
</body>
4 - Listening to Event changes (Optional)
const element = document.querySelector('safehello-host');
element.addEventListener('eventChanged', ev => {
// Handle event updates.
});