1
0
Fork 0
mirror of https://github.com/eosswedenorg/apt synced 2026-06-18 04:50:03 +02:00

Adding assets/js/modules/alpine_collapse.js

This commit is contained in:
Henrik Hautakoski 2022-01-25 16:49:50 +01:00
parent 56c375f4d1
commit 648fa04d0a
No known key found for this signature in database
GPG key ID: 608414D93E862CCD
3 changed files with 21 additions and 1 deletions

View file

@ -0,0 +1,18 @@
// Alpine collapse component
export default () => ({
show: false,
trigger: {
['@click']() {
this.show = ! this.show;
},
['x-text']() {
return this.show ? 'Hide' : 'Show';
}
},
target: {
['x-show']() {
return this.show;
}
}
})