diff --git a/src/qqq/assets/theme/components/tabs/index.ts b/src/qqq/assets/theme/components/tabs/index.ts index 9174d6e..30952f4 100644 --- a/src/qqq/assets/theme/components/tabs/index.ts +++ b/src/qqq/assets/theme/components/tabs/index.ts @@ -1,68 +1,72 @@ /** -========================================================= -* Material Dashboard 2 PRO React TS - v1.0.0 -========================================================= + ========================================================= + * Material Dashboard 2 PRO React TS - v1.0.0 + ========================================================= -* Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts -* Copyright 2022 Creative Tim (https://www.creative-tim.com) + * Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts + * Copyright 2022 Creative Tim (https://www.creative-tim.com) -Coded by www.creative-tim.com + Coded by www.creative-tim.com ========================================================= -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + */ // Material Dashboard 2 PRO React TS Base Styles import colors from "qqq/assets/theme/base/colors"; -import borders from "qqq/assets/theme/base/borders"; -import boxShadows from "qqq/assets/theme/base/boxShadows"; // Material Dashboard 2 PRO React TS Helper Functions import pxToRem from "qqq/assets/theme/functions/pxToRem"; -const { grey, white } = colors; -const { borderRadius } = borders; -const { tabsBoxShadow } = boxShadows; +const {grey, white} = colors; // types type Types = any; const tabs: Types = { - styleOverrides: { - root: { - position: "relative", - backgroundColor: grey[100], - borderRadius: borderRadius.xl, - minHeight: "unset", - padding: pxToRem(4), - }, - - flexContainer: { - height: "100%", - position: "relative", - zIndex: 10, - }, - - fixed: { - overflow: "unset !important", - overflowX: "unset !important", - }, - - vertical: { - "& .MuiTabs-indicator": { - width: "100%", + styleOverrides: { + root: { + position: "relative", + borderRadius: 0, + borderBottom: "1px solid", + borderBottomColor: grey[400], + minHeight: "unset", + padding: "0", + margin: "0" }, - }, - indicator: { - height: "100%", - borderRadius: borderRadius.lg, - backgroundColor: white.main, - boxShadow: tabsBoxShadow.indicator, - transition: "all 500ms ease", - }, - }, + scroller: { + marginLeft: "0.5rem" + }, + + flexContainer: { + height: "100%", + position: "relative", + width: "fit-content", + zIndex: 10, + }, + + fixed: { + overflow: "unset !important", + overflowX: "unset !important", + }, + + vertical: { + "& .MuiTabs-indicator": { + width: "100%", + }, + }, + + indicator: { + height: "100%", + borderRadius: 0, + backgroundColor: white.main, + borderBottom: "2px solid", + borderBottomColor: colors.info.main, + transition: "all 500ms ease", + }, + }, }; export default tabs; diff --git a/src/qqq/assets/theme/components/tabs/tab.ts b/src/qqq/assets/theme/components/tabs/tab.ts index 0da16bd..76ecc8e 100644 --- a/src/qqq/assets/theme/components/tabs/tab.ts +++ b/src/qqq/assets/theme/components/tabs/tab.ts @@ -1,17 +1,17 @@ /** -========================================================= -* Material Dashboard 2 PRO React TS - v1.0.0 -========================================================= + ========================================================= + * Material Dashboard 2 PRO React TS - v1.0.0 + ========================================================= -* Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts -* Copyright 2022 Creative Tim (https://www.creative-tim.com) + * Product Page: https://www.creative-tim.com/product/material-dashboard-2-pro-react-ts + * Copyright 2022 Creative Tim (https://www.creative-tim.com) -Coded by www.creative-tim.com + Coded by www.creative-tim.com ========================================================= -* The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. -*/ + * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + */ // Material Dashboard 2 PRO React TS Base Styles import typography from "qqq/assets/theme/base/typography"; @@ -21,48 +21,50 @@ import colors from "qqq/assets/theme/base/colors"; // Material Dashboard 2 PRO React TS Helper Functions import pxToRem from "qqq/assets/theme/functions/pxToRem"; -const { size, fontWeightRegular } = typography; -const { borderRadius } = borders; -const { dark } = colors; +const {size, fontWeightRegular} = typography; +const {borderRadius} = borders; +const {dark} = colors; // types type Types = any; const tab: Types = { - styleOverrides: { - root: { - display: "flex", - alignItems: "center", - flexDirection: "row", - flex: "1 1 auto", - textAlign: "center", - maxWidth: "unset !important", - minWidth: "unset !important", - minHeight: "unset !important", - fontSize: size.md, - fontWeight: fontWeightRegular, - textTransform: "none", - lineHeight: "inherit", - padding: pxToRem(4), - borderRadius: borderRadius.lg, - color: `${dark.main} !important`, - opacity: "1 !important", + styleOverrides: { + root: { + display: "flex", + alignItems: "center", + flexDirection: "row", + flex: "1 1 auto", + textAlign: "center", + maxWidth: "unset !important", + minWidth: "unset !important", + minHeight: "unset !important", + fontSize: size.md, + fontWeight: fontWeightRegular, + textTransform: "none", + lineHeight: "inherit", + padding: "0.75rem 0.5rem 0.5rem", + margin: "0 0.5rem", + borderRadius: 0, + border: 0, + color: `${dark.main} !important`, + opacity: "1 !important", - "& .material-icons, .material-icons-round": { - marginBottom: "0 !important", - marginRight: pxToRem(6), + "& .material-icons, .material-icons-round": { + marginBottom: "0 !important", + marginRight: pxToRem(6), + }, + + "& svg": { + marginBottom: "0 !important", + marginRight: pxToRem(6), + }, }, - "& svg": { - marginBottom: "0 !important", - marginRight: pxToRem(6), + labelIcon: { + paddingTop: pxToRem(4), }, - }, - - labelIcon: { - paddingTop: pxToRem(4), - }, - }, + }, }; export default tab; diff --git a/src/qqq/components/misc/TabPanel.tsx b/src/qqq/components/misc/TabPanel.tsx index 5cfa2b0..b687328 100644 --- a/src/qqq/components/misc/TabPanel.tsx +++ b/src/qqq/components/misc/TabPanel.tsx @@ -28,11 +28,12 @@ interface TabPanelProps children?: React.ReactNode; index: number; value: number; + style?: any; } export default function TabPanel(props: TabPanelProps) { - const {children, value, index, ...other} = props; + const {children, value, index, style, ...other} = props; return (