-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
42 lines (39 loc) · 1.4 KB
/
index.html
File metadata and controls
42 lines (39 loc) · 1.4 KB
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
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, minimum-scale=1, initial-scale=1, user-scalable=yes">
<title>Casper-Button Demo</title>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<script type="module" src="casper-button.js"></script>
<style>
html {
--primary-color: #00ABC1;
--primary-variant-color: #127886;
}
</style>
</head>
<body>
<div class="vertical-section-container centered">
<casper-button></casper-button>
<casper-button>With Text</casper-button>
<casper-button disabled>Disabled</casper-button>
<casper-button id="submitting">Submitting</casper-button>
<casper-button id="actions" has-actions>With Actions</casper-button>
<casper-button id="progress"></casper-button>
</div>
<script type="text/javascript">
document.addEventListener('WebComponentsReady', () => {
// Submitting and progress.
document.querySelector('#progress').submitting(true);
document.querySelector('#progress').progress = 50;
// Submitting.
document.querySelector('#submitting').submitting(true);
// Actions.
document.querySelector('#actions').actions = [
{ text: 'Alert', onClick: () => alert('Click') }
];
});
</script>
</body>
</html>