add json doc for customtablist component

This commit is contained in:
Vishnu Sreekumaran Nair committed 2025-04-10 17:51:14 -04:00
1 parent 6e115052c6
commit b300c1b830
1 file changed
+20
+20
View File
@@ -2,6 +2,26 @@ import { Box, useTheme } from "@mui/material";
import { TabList } from "@mui/lab";
import PropTypes from "prop-types";
/**
* CustomTabList component
*
* Wraps MUI's TabList inside a Box to apply consistent styling, specifically a bottom border,
* while avoiding the default top, left, and right borders applied through global MuiTabs overrides.
* This is used to match our tab layout across pages like Account and StatusPage.
*
* @component
* @example
* <CustomTabList value={value} onChange={handleChange}>
* <Tab label="General" value="general" />
* <Tab label="Settings" value="settings" />
* </CustomTabList>
*
* @param {string} value - The currently selected tab's value.
* @param {function} onChange - Callback when a different tab is selected.
* @param {React.ReactNode} children - Tab components to render inside the TabList.
* @param {object} props - Additional props passed to the TabList component.
*/
const CustomTabList = ({ value, onChange, children, ...props }) => {
const theme = useTheme();