Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F101016898
index.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, 20:38
Size
1 KB
Mime Type
text/x-java
Expires
Thu, Feb 6, 20:38 (1 d, 21 h)
Engine
blob
Format
Raw Data
Handle
24048840
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
index.js
View Options
/** @license MUI v5.11.0
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
/* eslint-disable no-underscore-dangle */
import
emStyled
from
'@emotion/styled'
;
export
default
function
styled
(
tag
,
options
)
{
const
stylesFactory
=
emStyled
(
tag
,
options
);
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
return
(...
styles
)
=>
{
const
component
=
typeof
tag
===
'string'
?
`
"${tag}"
`
:
'component'
;
if
(
styles
.
length
===
0
)
{
console
.
error
([
`
MUI
:
Seems
like
you
called
\`
styled
(
$
{
component
})()
\`
without
a
\`
style
\`
argument
.
`
,
'You must provide a `styles` argument: `styled("div")(styleYouForgotToPass)`.'
].
join
(
'\n'
));
}
else
if
(
styles
.
some
(
style
=>
style
===
undefined
))
{
console
.
error
(
`
MUI
:
the
styled
(
$
{
component
})(...
args
)
API
requires
all
its
args
to
be
defined
.
`
);
}
return
stylesFactory
(...
styles
);
};
}
return
stylesFactory
;
}
// eslint-disable-next-line @typescript-eslint/naming-convention
export
const
internal_processStyles
=
(
tag
,
processor
)
=>
{
// Emotion attaches all the styles as `__emotion_styles`.
// Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186
if
(
Array
.
isArray
(
tag
.
__emotion_styles
))
{
tag
.
__emotion_styles
=
processor
(
tag
.
__emotion_styles
);
}
};
export
{
ThemeContext
,
keyframes
,
css
}
from
'@emotion/react'
;
export
{
default
as
StyledEngineProvider
}
from
'./StyledEngineProvider'
;
export
{
default
as
GlobalStyles
}
from
'./GlobalStyles'
;
Event Timeline
Log In to Comment