Skip to content

Commit

Permalink
feat: updated prop position
Browse files Browse the repository at this point in the history
  • Loading branch information
Viraj-10 committed Sep 19, 2024
1 parent 7482155 commit 2d62478
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/unstyled/actionsheet/src/Actionsheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export function Actionsheet<T>(StyledActionsheet: React.ComponentType<T>) {
snapPoints,
// @ts-ignore
_experimentalOverlay = false,
preventScroll = false,
...props
}: T & IActionsheetProps,
ref?: any
Expand Down Expand Up @@ -64,6 +65,7 @@ export function Actionsheet<T>(StyledActionsheet: React.ComponentType<T>) {
initialFocusRef,
finalFocusRef,
snapPoints,
preventScroll,
};
}, [
handleClose,
Expand All @@ -75,6 +77,7 @@ export function Actionsheet<T>(StyledActionsheet: React.ComponentType<T>) {
initialFocusRef,
finalFocusRef,
snapPoints,
preventScroll,
]);

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/unstyled/actionsheet/src/ActionsheetContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ function ActionsheetContent(
children,
_experimentalContent = false,
focusScope = true,
preventScroll = true,
...props
}: any,
ref?: any
Expand All @@ -40,6 +39,7 @@ function ActionsheetContent(
handleCloseBackdrop,
finalFocusRef,
snapPoints,
preventScroll,
} = React.useContext(ActionsheetContext);

usePreventScroll({ isDisabled: preventScroll });
Expand Down
1 change: 1 addition & 0 deletions packages/unstyled/actionsheet/src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export const ActionsheetContext = React.createContext({
bottomInset: 0 as number,
trapFocus: true as boolean,
snapPoints: [] as Array<number>,
preventScroll: true as boolean,
});

0 comments on commit 2d62478

Please sign in to comment.