Last active
April 3, 2019 19:08
-
-
Save mav-erick/cb5572ebae822651dfb9e0ad71734d75 to your computer and use it in GitHub Desktop.
AYS test html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Document</title> | |
<style> | |
.jacked-up { | |
font-size: 50px; | |
font-style: italic; | |
} | |
.bg-green { | |
background: forestgreen !important; | |
} | |
</style> | |
<script src="elements.js"></script> | |
</head> | |
<body> | |
<ays-button | |
id="aysButton" | |
label="Hello" | |
confirmationtext="Sure about this?" | |
yeslabel="Sure" | |
nolabel="Nah" | |
textclass="jacked-up" | |
stickyfooter="false" | |
closelabel="Cut" | |
modalclass="bg-green" | |
></ays-button> | |
</body> | |
<script> | |
var element = document.getElementById("aysButton"); | |
element.addEventListener("onOpen", function(e) { | |
console.log("On opened fired"); | |
}); | |
element.addEventListener("onClose", function(e) { | |
console.log("On closed fired"); | |
}); | |
element.addEventListener("beforeClose", function(e) { | |
console.log("Before closed fired"); | |
}); | |
element.addEventListener("select", function(e) { | |
console.log("Received event:", e.detail); | |
}); | |
</script> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment