Retry to focus

This commit is contained in:
Belen Curcio 2021-01-06 11:16:31 -03:00
parent 1664a2377a
commit 6816851630
2 changed files with 2 additions and 2 deletions

View File

@ -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}

View File

@ -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) {