Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F100958237
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, Feb 4, 07:38
Size
598 B
Mime Type
text/x-java
Expires
Thu, Feb 6, 07:38 (2 d)
Engine
blob
Format
Raw Data
Handle
24064108
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