-
Notifications
You must be signed in to change notification settings - Fork 0
/
tooltip.html
43 lines (43 loc) · 1.02 KB
/
tooltip.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
<!doctype html>
<html lang="en">
<head>
<title>k-components</title>
<style>
html,
body {
height: 100vh;
margin: 0;
}
footer {
position: fixed;
bottom: 0;
}
</style>
<script type="module">
const { KToolTip } = await import("./k-tooltip.ts");
window.customElements.define("k-tooltip", KToolTip);
</script>
</head>
<body>
<header>
<k-tooltip>
<button slot="invoker">Hover or focus me!</button>
<span slot="content">hello!</span>
</k-tooltip>
<k-tooltip>
<button slot="invoker">Hover or focus me!</button>
<span slot="content">hello!</span>
</k-tooltip>
</header>
<footer>
<k-tooltip>
<button slot="invoker">Hover or focus me!</button>
<span slot="content">hello!</span>
</k-tooltip>
<k-tooltip>
<button slot="invoker">Hover or focus me!</button>
<span slot="content">hello!</span>
</k-tooltip>
</footer>
</body>
</html>