mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-18 16:08:19 +00:00
Adding mobile support for sidebar
This commit is contained in:
+1
-1
@@ -39,7 +39,7 @@ window.basecoat.registerDialog = function(Alpine) {
|
||||
$main: {
|
||||
'@dialog:open.window'(e) { if (e.detail && e.detail.id === this.id) this.show() },
|
||||
'@dialog:close.window'(e) { if (e.detail && e.detail.id === this.id) this.hide() },
|
||||
'@keydown.escape.window'() { this.open && this.hide(); },
|
||||
'@keydown.escape.window'() { this.open && this.hide() },
|
||||
},
|
||||
$trigger: {
|
||||
'@click'() { this.show() },
|
||||
|
||||
+2
-6
@@ -14,12 +14,8 @@ window.basecoat.registerSidebar= function(Alpine) {
|
||||
$main: {
|
||||
'@sidebar:open.window'(e) { if (!this.id || (e.detail && e.detail.id === this.id)) this.open = true },
|
||||
'@sidebar:close.window'(e) { if (!this.id || (e.detail && e.detail.id === this.id)) this.open = false },
|
||||
'@sidebar:toggle.window'(e) {
|
||||
if (!this.id || (e.detail && e.detail.id === this.id)) {
|
||||
this.open = !this.open;
|
||||
console.log('toggle', e);
|
||||
}
|
||||
},
|
||||
'@sidebar:toggle.window'(e) { if (!this.id || (e.detail && e.detail.id === this.id)) this.open = !this.open },
|
||||
'@click'(e) { if (e.target === this.$el) this.open = false },
|
||||
':aria-hidden'() { return !this.open },
|
||||
':inert'() { return !this.open },
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user