Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F122985251
IsolateButton.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
Wed, Jul 23, 06:39
Size
1 KB
Mime Type
text/x-java
Expires
Fri, Jul 25, 06:39 (2 d)
Engine
blob
Format
Raw Data
Handle
27587609
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
IsolateButton.js
View Options
import
"core-js/modules/es.function.name"
;
import
React
from
'react'
;
import
PropTypes
from
'prop-types'
;
import
{
MdFullscreen
,
MdFullscreenExit
}
from
'react-icons/md'
;
import
ToolbarButton
from
'rsg-components/ToolbarButton'
;
import
getUrl
from
'../../utils/getUrl'
;
var
IsolateButton
=
function
IsolateButton
(
_ref
)
{
var
name
=
_ref
.
name
,
example
=
_ref
.
example
,
isolated
=
_ref
.
isolated
,
href
=
_ref
.
href
;
if
(
isolated
&&
!
href
)
{
return
null
;
}
var
testID
=
example
?
name
+
"-"
+
example
+
"-isolate-button"
:
name
+
"-isolate-button"
;
return
isolated
?
/*#__PURE__*/
React
.
createElement
(
ToolbarButton
,
{
href
:
href
,
title
:
"Show all components"
,
testId
:
testID
},
/*#__PURE__*/
React
.
createElement
(
MdFullscreenExit
,
null
))
:
/*#__PURE__*/
React
.
createElement
(
ToolbarButton
,
{
href
:
getUrl
({
name
:
name
,
example
:
example
,
isolated
:
true
}),
title
:
"Open isolated"
,
testId
:
testID
},
/*#__PURE__*/
React
.
createElement
(
MdFullscreen
,
null
));
};
IsolateButton
.
propTypes
=
{
name
:
PropTypes
.
string
.
isRequired
,
example
:
PropTypes
.
number
,
isolated
:
PropTypes
.
bool
};
export
default
IsolateButton
;
Event Timeline
Log In to Comment