Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99905687
generateUtilityClass.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
Mon, Jan 27, 05:30
Size
616 B
Mime Type
text/x-java
Expires
Wed, Jan 29, 05:30 (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
23805396
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
generateUtilityClass.js
View Options
import
ClassNameGenerator
from
'../ClassNameGenerator'
;
const
globalStateClassesMapping
=
{
active
:
'active'
,
checked
:
'checked'
,
completed
:
'completed'
,
disabled
:
'disabled'
,
error
:
'error'
,
expanded
:
'expanded'
,
focused
:
'focused'
,
focusVisible
:
'focusVisible'
,
required
:
'required'
,
selected
:
'selected'
};
export
default
function
generateUtilityClass
(
componentName
,
slot
,
globalStatePrefix
=
'Mui'
)
{
const
globalStateClass
=
globalStateClassesMapping
[
slot
];
return
globalStateClass
?
`
$
{
globalStatePrefix
}
-
$
{
globalStateClass
}
`
:
`
$
{
ClassNameGenerator
.
generate
(
componentName
)}
-
$
{
slot
}
`
;
}
Event Timeline
Log In to Comment