-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathindex.html
More file actions
35 lines (31 loc) · 1.04 KB
/
Copy pathindex.html
File metadata and controls
35 lines (31 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<title>StackOne Hub — Web Component Demo</title>
<script src="dist/webcomponent.js"></script>
</head>
<body>
<!-- Replace the token below with a connect-session token minted from your StackOne API key. Do not commit real tokens. -->
<stackone-hub
id="hub"
token="REPLACE_WITH_YOUR_CONNECT_SESSION_TOKEN"
base-url="http://localhost:4000"
mode="integration-picker"
height="600px"
theme="light"
></stackone-hub>
<script>
const el = document.getElementById('hub');
el.addEventListener('success', (event) => {
console.log('[hub] success', event.detail);
});
el.addEventListener('close', () => {
console.log('[hub] close');
});
// Property-setter equivalents (work alongside the events):
// el.onSuccess = (account) => console.log('via property', account);
// el.onClose = () => console.log('closed via property');
// el.themeObject = { primaryColor: '#7c3aed' };
</script>
</body>
</html>