mirror of
https://github.com/vercel/commerce.git
synced 2025-06-30 02:11: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" />
|
<Cross className="h-6 w-6" />
|
||||||
</button>
|
</button>
|
||||||
<FocusTrap>{children}</FocusTrap>
|
<FocusTrap focusFirst>{children}</FocusTrap>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
) : null}
|
) : null}
|
||||||
|
@ -3,7 +3,7 @@ import { tabbable } from 'tabbable'
|
|||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
children: React.ReactNode | any
|
children: React.ReactNode | any
|
||||||
focusFirst: boolean
|
focusFirst?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function FocusTrap({ children, focusFirst = false }: Props) {
|
export default function FocusTrap({ children, focusFirst = false }: Props) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user