Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99921368
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
Mon, Jan 27, 07:16
Size
625 B
Mime Type
text/x-java
Expires
Wed, Jan 29, 07:16 (2 d)
Engine
blob
Format
Raw Data
Handle
23799358
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
!=
null
?
tabId
:
undefined
,
hidden
,
id
:
id
!=
null
?
id
:
undefined
};
};
return
{
hidden
,
getRootProps
};
};
export
default
useTabPanel
;
Event Timeline
Log In to Comment