Last active
April 15, 2020 06:39
-
-
Save ShilpaLalwani/b8a5346dea5ffb2e5483b186471f2381 to your computer and use it in GitHub Desktop.
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
<custom-card | |
title="Custom Element" | |
sub-title="Donna Marshall" | |
caption="Lorem ipsum dolor sit, amet consectetur adipisicing elit." | |
avtar="https://uinames.com/api/photos/female/15.jpg" | |
image="https://images.pexels.com/photos/169193/pexels-photo-169193.jpeg?w=940&h=650&auto=compress&cs=tinysrgb" | |
> | |
</custom-card> | |
<script> | |
const el = document.querySelector('custom-card'); | |
el.addEventListener('likeNotify', e => { | |
console.log('Like Cliked'); | |
}); | |
el.addEventListener('shareNotify', e => { | |
console.log('Share Cliked'); | |
}); | |
el.addEventListener('learnMoreNotify', e => { | |
console.log('learn more Cliked'); | |
}); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment