avances poderosos en ui
This commit is contained in:
20
ui/src/stores/useUI.js
Normal file
20
ui/src/stores/useUI.js
Normal file
@@ -0,0 +1,20 @@
|
||||
// src/stores/useUi.js
|
||||
import { defineStore } from 'pinia'
|
||||
|
||||
export const useUi = defineStore('ui', {
|
||||
state: () => ({
|
||||
sidebarOpen: true, // visible por defecto en desktop
|
||||
}),
|
||||
|
||||
actions: {
|
||||
toggleSidebar () {
|
||||
this.sidebarOpen = !this.sidebarOpen
|
||||
},
|
||||
closeSidebar () {
|
||||
this.sidebarOpen = false
|
||||
},
|
||||
openSidebar () {
|
||||
this.sidebarOpen = true
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user