| @ -0,0 +1,45 @@ | |||||
| <tiny-consent-link> | |||||
| <a id="tiny-consent-link" class="tiny-consent-link" onclick={ handleOpen }> | |||||
| { state.options.text.open } | |||||
| </a> | |||||
| <script> | |||||
| /** | |||||
| * tiny-consent-link.riot | |||||
| * | |||||
| * @author Björn Hase | |||||
| * @license http://opensource.org/licenses/MIT The MIT License | |||||
| * @link https://gitlab.tentakelfabrik.de/tentakelfabrik/tiny-components/tiny-consent Gitlab Repository | |||||
| * | |||||
| */ | |||||
| export default { | |||||
| /** | |||||
| * | |||||
| * | |||||
| */ | |||||
| state: | |||||
| { | |||||
| options: { | |||||
| text: { | |||||
| 'open': 'Open' | |||||
| } | |||||
| } | |||||
| }, | |||||
| /** | |||||
| * | |||||
| * @param {[type]} event | |||||
| * @return {[type]} | |||||
| */ | |||||
| handleOpen(event) { | |||||
| event.preventDefault(); | |||||
| window.dispatchEvent(new window.CustomEvent('tiny-consent-open')) | |||||
| } | |||||
| } | |||||
| </script> | |||||
| </tiny-consent-link> | |||||