Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100889507
TabsContext.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, Feb 3, 16:00
Size
691 B
Mime Type
text/x-java
Expires
Wed, Feb 5, 16:00 (2 d)
Engine
blob
Format
Raw Data
Handle
24049225
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
TabsContext.js
View Options
import
*
as
React
from
'react'
;
/**
* @ignore - internal component.
*/
const
Context
=
/*#__PURE__*/
React
.
createContext
(
null
);
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
Context
.
displayName
=
'TabsContext'
;
}
/**
* @returns {unknown}
*/
export
function
useTabContext
()
{
return
React
.
useContext
(
Context
);
}
export
function
getPanelId
(
context
,
value
)
{
const
{
idPrefix
}
=
context
;
if
(
idPrefix
===
null
)
{
return
null
;
}
return
`
$
{
context
.
idPrefix
}
-
P
-
$
{
value
}
`
;
}
export
function
getTabId
(
context
,
value
)
{
const
{
idPrefix
}
=
context
;
if
(
idPrefix
===
null
)
{
return
null
;
}
return
`
$
{
context
.
idPrefix
}
-
T
-
$
{
value
}
`
;
}
export
default
Context
;
Event Timeline
Log In to Comment