Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102746282
createSvgIcon.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 23, 18:30
Size
836 B
Mime Type
text/x-java
Expires
Tue, Feb 25, 18:30 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24413587
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
createSvgIcon.js
View Options
import
_extends
from
"@babel/runtime/helpers/esm/extends"
;
import
*
as
React
from
'react'
;
import
SvgIcon
from
'../SvgIcon'
;
/**
* Private module reserved for @mui packages.
*/
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
export
default
function
createSvgIcon
(
path
,
displayName
)
{
function
Component
(
props
,
ref
)
{
return
/*#__PURE__*/
_jsx
(
SvgIcon
,
_extends
({
"data-testid"
:
`
$
{
displayName
}
Icon
`
,
ref
:
ref
},
props
,
{
children
:
path
}));
}
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
// Need to set `displayName` on the inner component for React.memo.
// React prior to 16.14 ignores `displayName` on the wrapper.
Component
.
displayName
=
`
$
{
displayName
}
Icon
`
;
}
Component
.
muiName
=
SvgIcon
.
muiName
;
return
/*#__PURE__*/
React
.
memo
(
/*#__PURE__*/
React
.
forwardRef
(
Component
));
}
Event Timeline
Log In to Comment