Skip to content

Commit

Permalink
Use ModalPopoutPortal in Alert and ActionSheet
Browse files Browse the repository at this point in the history
  • Loading branch information
andrey-medvedev-vk committed Oct 11, 2024
1 parent efeeba8 commit 5fc39b7
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions packages/vkui/src/components/ActionSheet/ActionSheet.tsx
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ import { useAdaptivityWithJSMediaQueries } from '../../hooks/useAdaptivityWithJS
import { useObjectMemo } from '../../hooks/useObjectMemo';
import { usePlatform } from '../../hooks/usePlatform';
import { useCSSKeyframesAnimationController } from '../../lib/animation';
import { AppRootPortal } from '../AppRoot/AppRootPortal';
import { ModalPopoutPortal } from '../AppRoot/ModalPopoutPortal';
import { useScrollLock } from '../AppRoot/ScrollContext';
import { PopoutWrapper } from '../PopoutWrapper/PopoutWrapper';
import { Footnote } from '../Typography/Footnote/Footnote';
@@ -141,7 +141,7 @@ export const ActionSheet = ({
}

return (
<AppRootPortal>
<ModalPopoutPortal>
<PopoutWrapper
closing={Boolean(closingBy)}
alignY="bottom"
@@ -152,6 +152,6 @@ export const ActionSheet = ({
>
{actionSheet}
</PopoutWrapper>
</AppRootPortal>
</ModalPopoutPortal>
);
};
6 changes: 3 additions & 3 deletions packages/vkui/src/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@ import type {
HasDataAttribute,
HasRootRef,
} from '../../types';
import { AppRootPortal } from '../AppRoot/AppRootPortal';
import { ModalPopoutPortal } from '../AppRoot/ModalPopoutPortal';
import { useScrollLock } from '../AppRoot/ScrollContext';
import type { ButtonProps } from '../Button/Button';
import { FocusTrap } from '../FocusTrap/FocusTrap';
@@ -135,7 +135,7 @@ export const Alert = ({
useScrollLock();

return (
<AppRootPortal>
<ModalPopoutPortal>
<PopoutWrapper
className={className}
closing={closing}
@@ -198,6 +198,6 @@ export const Alert = ({
)}
</FocusTrap>
</PopoutWrapper>
</AppRootPortal>
</ModalPopoutPortal>
);
};

0 comments on commit 5fc39b7

Please sign in to comment.