mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-08-20 15:36:03 +00:00
transform autoFocus prop to bool in Modal
This commit is contained in:
parent
ab88feee72
commit
6e76843246
1 changed files with 1 additions and 1 deletions
|
|
@ -8,7 +8,7 @@ const { useModalsContainer } = require('../ModalsContainerContext');
|
|||
const Modal = ({ className, autoFocus, children, ...props }) => {
|
||||
const modalsContainer = useModalsContainer();
|
||||
return ReactDOM.createPortal(
|
||||
<FocusLock className={classnames(className, 'modal-container')} autoFocus={typeof autoFocus === 'boolean' ? autoFocus : false} lockProps={props}>
|
||||
<FocusLock className={classnames(className, 'modal-container')} autoFocus={!!autoFocus} lockProps={props}>
|
||||
{children}
|
||||
</FocusLock>,
|
||||
modalsContainer
|
||||
|
|
|
|||
Loading…
Reference in a new issue