Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101372973
Portal.js
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sun, Feb 9, 19:39
Size
586 B
Mime Type
text/x-java
Expires
Tue, Feb 11, 19:39 (2 d)
Engine
blob
Format
Raw Data
Handle
24146664
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
Portal.js
View Options
import
ReactDOM
from
'react-dom'
;
import
*
as
React
from
'react'
;
import
useWaitForDOMRef
from
'./useWaitForDOMRef'
;
import
{
Fragment
as
_Fragment
}
from
"react/jsx-runtime"
;
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
/**
* @public
*/
const
Portal
=
({
container
,
children
,
onRendered
})
=>
{
const
resolvedContainer
=
useWaitForDOMRef
(
container
,
onRendered
);
return
resolvedContainer
?
/*#__PURE__*/
_jsx
(
_Fragment
,
{
children
:
/*#__PURE__*/
ReactDOM
.
createPortal
(
children
,
resolvedContainer
)
})
:
null
;
};
Portal
.
displayName
=
'Portal'
;
export
default
Portal
;
Event Timeline
Log In to Comment