Skip to content

Commit

Permalink
fix(Alert): add FocusTrap props to Alert props (#8136)
Browse files Browse the repository at this point in the history
* fix(Alert): add FocusTrap props to Alert props

* fix: pick only restoreFocus from UseFocusTrapProps

Co-authored-by: Inomdzhon Mirdzhamolov <i.mirdzhamolov@vk.team>

---------

Co-authored-by: Inomdzhon Mirdzhamolov <i.mirdzhamolov@vk.team>
  • Loading branch information
EldarMuhamethanov and inomdzhon authored Jan 10, 2025
1 parent f4d0c23 commit 58f1020
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/vkui/src/components/Alert/Alert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import * as React from 'react';
import { Icon20Cancel } from '@vkontakte/icons';
import { classNames, hasReactNode, noop } from '@vkontakte/vkjs';
import { useAdaptivityWithJSMediaQueries } from '../../hooks/useAdaptivityWithJSMediaQueries';
import { type UseFocusTrapProps } from '../../hooks/useFocusTrap';
import { usePlatform } from '../../hooks/usePlatform';
import { useCSSKeyframesAnimationController } from '../../lib/animation';
import { stopPropagation } from '../../lib/utils';
Expand Down Expand Up @@ -49,6 +50,7 @@ export interface AlertActionInterface

export interface AlertProps
extends Omit<React.HTMLAttributes<HTMLElement>, 'title'>,
Pick<UseFocusTrapProps, 'restoreFocus'>,
HasRootRef<HTMLDivElement> {
actionsLayout?: 'vertical' | 'horizontal';
actionsAlign?: AlignType;
Expand Down

0 comments on commit 58f1020

Please sign in to comment.