16 lines
493 B
TypeScript
16 lines
493 B
TypeScript
/* The open state of the ⋮ menu on a row of the admin dashboard, shared like the
|
|
other popups. One row's menu at a time, so it holds the id of the account
|
|
whose menu is open — '' when none is — rather than a boolean per row. */
|
|
export function useAccountActionsMenu() {
|
|
const openId = useState<string>('account-actions-menu:open', () => '')
|
|
|
|
function show(id: string) {
|
|
openId.value = id
|
|
}
|
|
function hide() {
|
|
openId.value = ''
|
|
}
|
|
|
|
return { openId, show, hide }
|
|
}
|