-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
55 lines (50 loc) · 1.72 KB
/
index.html
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example</title>
<style>
#root {
padding: 1rem;
}
.with-ok-prefix:before {
content: "[OK] ";
color: #006600;
}
.blokk-m {
margin-bottom: 1rem;
}
</style>
<link rel="stylesheet" href="https://cdn.nav.no/personoversikt/internarbeidsflate-decorator-v3/dev/latest/dist/index.css" />
<script src="https://cdn.nav.no/personoversikt/internarbeidsflate-decorator-v3/dev/latest/dist/bundle.js"></script>
<script type="application/javascript">
window['NAVSPA'] = window['NAVSPA'] || {};
window['NAVSPA-V2'] = window['NAVSPA-V2'] || {};
// Deprecated oppsett
window['NAVSPA'].oldapp = (element, props) => {
element.innerHTML = '';
const header = document.createElement('p');
header.classList.add('with-ok-prefix');
header.textContent = `Innhold fra application eksportert med deprecated oppsett`;
element.appendChild(header);
}
// Nytt oppsett
window['NAVSPA-V2'].newapp = {
mount: (element, props) => {
element.innerHTML = '';
const header = document.createElement('p');
header.classList.add('with-ok-prefix');
header.textContent = `Innhold fra application eksportert med standard oppsett`;
element.appendChild(header);
},
unmount: (element) => {
element.innerHTML = '';
}
}
</script>
<script type="module" src="example/index.tsx"></script>
</head>
<body>
<div id="root"></div>
</body>
</html>