-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
65 lines (60 loc) · 2.32 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
56
57
58
59
60
61
62
63
64
65
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Component Test Page</title>
<script src="/src/index.ts" type="module"></script>
<!--
To include the necessary assets for testing, you have several options:
1. Full Production Bundle: This is the entire application bundled together.
You can include it by uncommenting the following line:
<script src="dist/index.js" type="module"></script>
2. Individual Components: If you want to test specific components, you can
import them individually. You'll need to know the path to the component
file in the 'dist' directory. For example:
<script src="dist/components/your-component.js" type="module"></script>
<script src="/src/components/your-component.ts" type="module"></script>
3. Standard Includes: These are common files that are often needed in the
head tag. For example, a global stylesheet is included in this file:
<link rel="stylesheet" href="public/global.css" />
Remember to replace 'your-component' with the name of the component you want
to test. Also, ensure the paths to the files are correct relative to this
HTML file.
-->
<!-- <script src="dist/index.mjs" type="module"></script> -->
<link rel="stylesheet" href="/global.css" />
<script>
function switchComponent(componentName) {
const container = document.querySelector('.component-container');
container.innerHTML = '';
const newComponent = document.createElement(componentName);
container.appendChild(newComponent);
}
</script>
</head>
<body>
<header
style="
display: flex;
justify-content: flex-end;
position: absolute;
right: 0;
top: 0;
z-index: 1;
"
>
<button onclick="switchComponent('outline-yext-universal')">
Universal
</button>
<button onclick="switchComponent('outline-yext-entities')">
Directory
</button>
</header>
<div class="component-container">
<outline-yext-universal></outline-yext-universal>
<!-- <outline-yext-entities></outline-yext-entities> -->
</div>
</body>
</html>