16 lines
474 B
TypeScript
16 lines
474 B
TypeScript
/* The open state of the article's ⋮ actions menu, shared like the other
|
|
popups: the book's Esc handler defers to whatever popup is on top, and the
|
|
menu steps aside when search or settings opens — popups don't stack. */
|
|
export function useArticleActionsMenu() {
|
|
const open = useState<boolean>('article-actions-menu:open', () => false)
|
|
|
|
function show() {
|
|
open.value = true
|
|
}
|
|
function hide() {
|
|
open.value = false
|
|
}
|
|
|
|
return { open, show, hide }
|
|
}
|