1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-06 00:07:44 +01:00
unleash.unleash/frontend/src/component/common/TabNav/TabPanel/TabPanel.jsx
Fredrik Strand Oseberg dbed06f300 Feat/material UI (#250)
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>
2021-03-30 15:14:02 +02:00

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;