Add business dashboard dark mode from Super Admin theme setting.
Login and in-app surfaces follow tenant themeMode, matching customer dark tokens, with themed switches and tighter card/table chrome. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
65012717d0
commit
e9400c2281
@@ -0,0 +1,19 @@
|
||||
/** Nested-modal-safe body scroll lock. Restoring a captured overflow value
|
||||
* leaves `overflow: hidden` on body after overlapping dialogs close. */
|
||||
let lockCount = 0
|
||||
|
||||
export function lockBodyScroll() {
|
||||
lockCount += 1
|
||||
if (lockCount === 1) {
|
||||
document.documentElement.style.overflow = 'hidden'
|
||||
document.body.style.overflow = 'hidden'
|
||||
}
|
||||
}
|
||||
|
||||
export function unlockBodyScroll() {
|
||||
lockCount = Math.max(0, lockCount - 1)
|
||||
if (lockCount === 0) {
|
||||
document.documentElement.style.overflow = ''
|
||||
document.body.style.overflow = ''
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user