@unicity/design-system
Version:
A comprehensive React component library built on Material-UI with advanced theming capabilities including neumorphism design support
10 lines • 854 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, } from '@mui/material';
import { StyledTabs, StyledTab, TabPanel } from './Tabs.style';
export const Tabs = ({ tabs, value, onChange, variant = 'standard', orientation = 'horizontal', showPanels = true, ...props }) => {
const handleChange = (event, newValue) => {
onChange(newValue);
};
return (_jsxs(Box, { children: [_jsx(StyledTabs, { value: value, onChange: handleChange, variant: variant, orientation: orientation, ...props, children: tabs.map((tab) => (_jsx(StyledTab, { label: tab.label, value: tab.value, disabled: tab.disabled, icon: tab.icon, iconPosition: "start" }, tab.value))) }), showPanels && tabs.map((tab) => (_jsx(TabPanel, { value: value, index: tab.value, children: tab.content }, tab.value)))] }));
};
//# sourceMappingURL=Tabs.js.map