Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F121968280
useTabPanel.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, Jul 15, 03:11
Size
598 B
Mime Type
text/x-java
Expires
Thu, Jul 17, 03:11 (2 d)
Engine
blob
Format
Raw Data
Handle
27419220
Attached To
rOACCT Open Access Compliance Check Tool (OACCT)
useTabPanel.js
View Options
import
{
useTabContext
,
getPanelId
,
getTabId
}
from
'../TabsUnstyled'
;
const
useTabPanel
=
parameters
=>
{
const
{
value
}
=
parameters
;
const
context
=
useTabContext
();
if
(
context
===
null
)
{
throw
new
Error
(
'No TabContext provided'
);
}
const
hidden
=
value
!==
context
.
value
;
const
id
=
getPanelId
(
context
,
value
);
const
tabId
=
getTabId
(
context
,
value
);
const
getRootProps
=
()
=>
{
return
{
'aria-labelledby'
:
tabId
??
undefined
,
hidden
,
id
:
id
??
undefined
};
};
return
{
hidden
,
getRootProps
};
};
export
default
useTabPanel
;
Event Timeline
Log In to Comment