create new Tablistwrapper component

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-04-10 14:48:10 -04:00
1 parent 0448d33631
commit 6421080a95
1 file changed
+28
+28
View File
@@ -0,0 +1,28 @@
import { Box, useTheme } from "@mui/material";
import { TabList } from "@mui/lab";
import PropTypes from "prop-types";
const TabListWrapper = ({ value, onChange, children, ...props }) => {
const theme = useTheme();
return (
<Box
sx={{
borderBottom: `1px solid ${theme.palette.primary.lowContrast}`,
"& .MuiTabs-root": { height: "fit-content", minHeight: "0" },
}}
>
<TabList value={value} onChange={onChange} {...props}>
{children}
</TabList>
</Box>
);
};
TabListWrapper.propTypes = {
value: PropTypes.string,
onChange: PropTypes.func,
children: PropTypes.node,
};
export default TabListWrapper;