This repository has been archived by the owner on Jul 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
53 lines (46 loc) · 1.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Custom Component</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.0/normalize.css">
<link rel="stylesheet" href="main.css">
</head>
<body>
<h1>Custom component</h1>
<section class="component">
<h2>Rating Chart</h2>
<rating-chart value="3" size="60"></rating-chart>
<rating-chart value="5" color="#EE5A24" size="120"></rating-chart>
<rating-chart value="9" color="#A3CB38" size="180"></rating-chart>
</section>
<section class="component">
<h2>Toggle Button</h2>
<toggle-button data-button="1">Toggle button</toggle-button>
<toggle-button disabled>Disabled button</toggle-button>
<toggle-button data-button="2" pressed>Pressed button</toggle-button>
</section>
<section class="component">
<h2>Make Model Year Select (horizontal)</h2>
<mmy-select horizontal></mmy-select>
</section>
<section class="component">
<h2>Make Model Year Select</h2>
<mmy-select></mmy-select>
</section>
<section class="component">
<h2>Five Star Input</h2>
<five-star-input></five-star-input>
<five-star-input style="--star-active:#3a64ff;"></five-star-input>
<five-star-input name="custom-name"
style="--star-active: #00b094; --star-default: rgba(80, 96, 137, 0.75);"></five-star-input>
</section>
<script src="main.js"></script>
<script>
const buttons = document.querySelectorAll('toggle-button');
buttons.forEach(button => {
button.addEventListener('click', event => console.log('button clicked', event.currentTarget.dataset.button));
});
</script>
</body>
</html>