Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100925425
StyledEngineProvider.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
Tue, Feb 4, 00:25
Size
1 KB
Mime Type
text/html
Expires
Thu, Feb 6, 00:25 (2 d)
Engine
blob
Format
Raw Data
Handle
24057288
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
StyledEngineProvider.js
View Options
import
*
as
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
CacheProvider
}
from
'@emotion/react'
;
import
createCache
from
'@emotion/cache'
;
// prepend: true moves MUI styles to the top of the <head> so they're loaded first.
// It allows developers to easily override MUI styles with other styling solutions, like CSS modules.
import
{
jsx
as
_jsx
}
from
"react/jsx-runtime"
;
var
cache
=
createCache
({
key
:
'css'
,
prepend
:
true
});
export
default
function
StyledEngineProvider
(
props
)
{
var
injectFirst
=
props
.
injectFirst
,
children
=
props
.
children
;
return
injectFirst
?
/*#__PURE__*/
_jsx
(
CacheProvider
,
{
value
:
cache
,
children
:
children
})
:
children
;
}
process
.
env
.
NODE_ENV
!==
"production"
?
StyledEngineProvider
.
propTypes
=
{
/**
* Your component tree.
*/
children
:
PropTypes
.
node
,
/**
* By default, the styles are injected last in the <head> element of the page.
* As a result, they gain more specificity than any other style sheet.
* If you want to override MUI's styles, set this prop.
*/
injectFirst
:
PropTypes
.
bool
}
:
void
0
;
Event Timeline
Log In to Comment