-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
44 lines (35 loc) · 1.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>Simple application using an Elix component</title>
<script type="module" src="./node_modules/elix/define/DateComboBox.js"></script>
<script type="module">
// Import the Elix components we want to use.
import DateComboBox from './node_modules/elix/define/DateComboBox.js';
// Instantiate an Elix component.
const dateComboBox = new DateComboBox();
// You can set custom properties on the component, invoke methods, etc.
dateComboBox.date = new Date('1 Jan 2021');
// We can add the components to the page like any other HTML elements.
document.body.appendChild(dateComboBox);
</script>
<style>
body {
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 15px;
}
</style>
</head>
<body>
<p>
This page shows how Elix components can be used in the context of
a TypeScript application. This page shows two instances of the Elix
<a href="https://component.kitchen/elix/DateComboBox">DateComboBox</a>
component. The first is created via markup; the second
is created at runtime in JavaScript. Both work the same way.
</p>
<elix-date-combo-box date="1 Jan 2020"></elix-date-combo-box>
</body>
</html>