diff --git a/packages/unstyled/actionsheet/src/Actionsheet.tsx b/packages/unstyled/actionsheet/src/Actionsheet.tsx index ea32b013a..dd4acf3fb 100644 --- a/packages/unstyled/actionsheet/src/Actionsheet.tsx +++ b/packages/unstyled/actionsheet/src/Actionsheet.tsx @@ -24,6 +24,7 @@ export function Actionsheet(StyledActionsheet: React.ComponentType) { snapPoints, // @ts-ignore _experimentalOverlay = false, + preventScroll = false, ...props }: T & IActionsheetProps, ref?: any @@ -64,6 +65,7 @@ export function Actionsheet(StyledActionsheet: React.ComponentType) { initialFocusRef, finalFocusRef, snapPoints, + preventScroll, }; }, [ handleClose, @@ -75,6 +77,7 @@ export function Actionsheet(StyledActionsheet: React.ComponentType) { initialFocusRef, finalFocusRef, snapPoints, + preventScroll, ]); return ( diff --git a/packages/unstyled/actionsheet/src/ActionsheetContent.tsx b/packages/unstyled/actionsheet/src/ActionsheetContent.tsx index ff0aa8fff..36f6ab62e 100644 --- a/packages/unstyled/actionsheet/src/ActionsheetContent.tsx +++ b/packages/unstyled/actionsheet/src/ActionsheetContent.tsx @@ -27,7 +27,6 @@ function ActionsheetContent( children, _experimentalContent = false, focusScope = true, - preventScroll = true, ...props }: any, ref?: any @@ -40,6 +39,7 @@ function ActionsheetContent( handleCloseBackdrop, finalFocusRef, snapPoints, + preventScroll, } = React.useContext(ActionsheetContext); usePreventScroll({ isDisabled: preventScroll }); diff --git a/packages/unstyled/actionsheet/src/context.ts b/packages/unstyled/actionsheet/src/context.ts index 8532f03bb..5332a02c0 100644 --- a/packages/unstyled/actionsheet/src/context.ts +++ b/packages/unstyled/actionsheet/src/context.ts @@ -13,4 +13,5 @@ export const ActionsheetContext = React.createContext({ bottomInset: 0 as number, trapFocus: true as boolean, snapPoints: [] as Array, + preventScroll: true as boolean, });