1.0.0 • Published 7 years ago
troublete-overlay v1.0.0
Troublete Overlay
General purpose overlay webcomponent
This component represents a general purpose overlay, that can be used as modal background or similar use-cases where it is neccessary to cover the whole parent element. (!) The only requirement is that the parent element has the style property position
set to relative
.
Install
$ npm i -S troublete/troublete-overlay
Demo Usage
<link rel="import" href="troublete-overlay.html">
...
<section style="position:relative; height:250px; width: 400px">
<troublete-overlay>
// content
</troublete-overlay>
</section>
Properties
- hidden (bool) - will determine if overlay is shown
Methods
- show() - will trigger the overlay to show up
- hide() - will trigger the overlay to hide
- toggle() - will toggle the visibility of the overlay
Contribute
- Fork repository & install requirements with
$ npm i
- Change component
- Run tests with
$ npm run test
- If tests pass, file a PR
1.0.0
7 years ago