Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F123469795
NameRenderer.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, Jul 27, 15:38
Size
1 KB
Mime Type
text/x-java
Expires
Tue, Jul 29, 15:38 (2 d)
Engine
blob
Format
Raw Data
Handle
27705161
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
NameRenderer.js
View Options
import
"core-js/modules/es.function.name"
;
import
"core-js/modules/es.string.small"
;
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
cx
from
'clsx'
;
import
Styled
from
'rsg-components/Styled'
;
export
var
styles
=
function
styles
(
_ref
)
{
var
fontFamily
=
_ref
.
fontFamily
,
fontSize
=
_ref
.
fontSize
,
color
=
_ref
.
color
;
return
{
name
:
{
fontFamily
:
fontFamily
.
monospace
,
fontSize
:
fontSize
.
small
,
color
:
color
.
name
},
isDeprecated
:
{
color
:
color
.
light
,
textDecoration
:
'line-through'
}
};
};
export
var
NameRenderer
=
function
NameRenderer
(
_ref2
)
{
var
_cx
;
var
classes
=
_ref2
.
classes
,
children
=
_ref2
.
children
,
deprecated
=
_ref2
.
deprecated
;
var
classNames
=
cx
(
classes
.
name
,
(
_cx
=
{},
_cx
[
classes
.
isDeprecated
]
=
deprecated
,
_cx
));
return
/*#__PURE__*/
React
.
createElement
(
"code"
,
{
className
:
classNames
},
children
);
};
NameRenderer
.
propTypes
=
{
classes
:
PropTypes
.
objectOf
(
PropTypes
.
string
.
isRequired
).
isRequired
,
children
:
PropTypes
.
node
.
isRequired
,
deprecated
:
PropTypes
.
bool
};
export
default
Styled
(
styles
)(
NameRenderer
);
Event Timeline
Log In to Comment