mirror of
https://github.com/vercel/commerce.git
synced 2025-06-29 18:01:21 +00:00
Retry to focus
This commit is contained in:
parent
1664a2377a
commit
6816851630
@ -52,7 +52,7 @@ const Modal: FC<Props> = ({ children, open, onClose, onEnter = null }) => {
|
||||
>
|
||||
<Cross className="h-6 w-6" />
|
||||
</button>
|
||||
<FocusTrap>{children}</FocusTrap>
|
||||
<FocusTrap focusFirst>{children}</FocusTrap>
|
||||
</div>
|
||||
</div>
|
||||
) : null}
|
||||
|
@ -3,7 +3,7 @@ import { tabbable } from 'tabbable'
|
||||
|
||||
interface Props {
|
||||
children: React.ReactNode | any
|
||||
focusFirst: boolean
|
||||
focusFirst?: boolean
|
||||
}
|
||||
|
||||
export default function FocusTrap({ children, focusFirst = false }: Props) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user