-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
34 lines (31 loc) · 936 Bytes
/
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom SVG Component</title>
<link rel="shortcut icon"
href="https://github.com/yashrajbharti/random-color-pearl/assets/43868318/46ef4432-3532-41a9-9e9a-0b6e963e3439"
type="image/x-icon">
<script src="src/randomColorSvg.js" defer></script>
<style>
body {
background-color: #2C2C2C;
display: grid;
place-items: center;
height: 100vh;
}
</style>
</head>
<body>
<random-color-svg id="pearl-svg" width="92px" height="92px" username="" colors="" title="avatar"></random-color-svg>
<script>
document.addEventListener("DOMContentLoaded", () => {
const svg = document.getElementById("pearl-svg");
if (svg instanceof RandomColorSvg) {
console.log(svg.getColors().toString());
}
});
</script>
</body>
</html>