Skip to content

Commit

Permalink
fix: move styles declared in useDisableBodyScroll() to a separate file (
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored May 7, 2024
1 parent fded6b4 commit 6533854
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix: move styles declared in useDisableBodyScroll() to a separate file",
"packageName": "@fluentui/react-dialog",
"email": "olfedias@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { makeResetStyles } from '@griffel/react';

// this style must be applied to the html element to disable scrolling
export const useHTMLNoScrollStyles = makeResetStyles({
overflowY: ['hidden', 'clip'],
scrollbarGutter: 'stable',
});
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
import { useFluent_unstable } from '@fluentui/react-shared-contexts';
import { makeResetStyles } from '@griffel/react';
import { useCallback } from 'react';

// this style must be applied to the html element to disable scrolling
const useHTMLNoScrollStyles = makeResetStyles({
overflowY: ['hidden', 'clip'],
scrollbarGutter: 'stable',
});
import { useHTMLNoScrollStyles } from './useDisableBodyScroll.styles';

/**
* hook that disables body scrolling through `overflowY: hidden` CSS property
Expand Down

0 comments on commit 6533854

Please sign in to comment.