mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-06 00:07:44 +01:00
dbed06f300
Co-authored-by: Ivar Conradi Østhus <ivarconr@gmail.com> Co-authored-by: Christopher Kolstad <chriswk@getunleash.ai> Co-authored-by: Christopher Kolstad <git@chriswk.no>
23 lines
501 B
JavaScript
23 lines
501 B
JavaScript
import React from 'react';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const TabPanel = ({ children, value, index, ...other }) => (
|
|
<div
|
|
role="tabpanel"
|
|
hidden={value !== index}
|
|
id={`wrapped-tabpanel-${index}`}
|
|
aria-labelledby={`wrapped-tab-${index}`}
|
|
{...other}
|
|
>
|
|
{value === index && children}
|
|
</div>
|
|
);
|
|
|
|
TabPanel.propTypes = {
|
|
value: PropTypes.number,
|
|
index: PropTypes.number,
|
|
children: PropTypes.object,
|
|
};
|
|
|
|
export default TabPanel;
|