@meveo-org/mv-click-away
v1.0.0
Published
MvClickAway is a Meveo component (based on lit-element) that registers a click event on the document allowing child components to listen to a custom event when a click outside the component is triggered.
Downloads
3
Keywords
Readme
mv-click-away
MvClickAway is a Meveo component (based on lit-element) that registers a click event on the document allowing child components to listen to a custom event when a click outside the component is triggered.
Quick Start
To experiment with the MvClickAway component.
Clone this repo.
Serve the project from the root directory with some http server (best served with meveo itself)
Update the click-away demo component in demo.js file
Sample usage
<mv-click-away @clicked-away="${() => {console.log("something else was clicked")}}">
<child-component></child-component>
</mv-click-away>
You can also check this demo