Merged in chore/SW-3298-move-sidepeekselfcontrolled- (pull request #2710)
chore(SW-3298): Moved SidePeekSelfControlled to design system * chore(SW-3298): Moved SidePeekSelfControlled to design system Approved-by: Anton Gunnarsson
This commit is contained in:
11
packages/common/hooks/useSetOverflowVisibleOnRA.ts
Normal file
11
packages/common/hooks/useSetOverflowVisibleOnRA.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
export default function useSetOverflowVisibleOnRA(isNestedInModal?: boolean) {
|
||||
function setOverflowVisible(isOpen: boolean) {
|
||||
if (isOpen) {
|
||||
document.body.style.overflow = "visible"
|
||||
} else if (!isNestedInModal) {
|
||||
document.body.style.overflow = ""
|
||||
}
|
||||
}
|
||||
|
||||
return setOverflowVisible
|
||||
}
|
||||
Reference in New Issue
Block a user