Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F99969951
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, 12:52
Size
598 B
Mime Type
text/x-java
Expires
Wed, Jan 29, 12:52 (2 d)
Engine
blob
Format
Raw Data
Handle
23827299
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