initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
export const useSettings = () => {
|
||||
const open = useState<boolean>('settings:open', () => false)
|
||||
const currentPage = useState<string>('settings:currentPage', () => 'page1')
|
||||
|
||||
const toggle = () => { open.value = !open.value }
|
||||
const setPage = (page: string) => { currentPage.value = page }
|
||||
const close = () => {
|
||||
open.value = false
|
||||
currentPage.value = 'page1'
|
||||
}
|
||||
|
||||
return { open, currentPage, toggle, setPage, close }
|
||||
}
|
||||
Reference in New Issue
Block a user