From 8095d958fa71c5a894091328ecc2b25f08184285 Mon Sep 17 00:00:00 2001 From: Fran McDade Date: Fri, 10 Nov 2023 15:34:40 +1000 Subject: [PATCH] feat: updated horizontal tab styles (#436) --- .../src/theme/common/components.ts | 57 +++++++++++-------- 1 file changed, 33 insertions(+), 24 deletions(-) diff --git a/packages/data-explorer-ui/src/theme/common/components.ts b/packages/data-explorer-ui/src/theme/common/components.ts index eb063a12..2fc56dd0 100644 --- a/packages/data-explorer-ui/src/theme/common/components.ts +++ b/packages/data-explorer-ui/src/theme/common/components.ts @@ -1296,32 +1296,8 @@ export const MuiTab = (theme: Theme): Components["MuiTab"] => { padding: 12, textTransform: "capitalize", // eslint-disable-next-line sort-keys -- disabling key order for readability - "&:hover": { - color: theme.palette.ink.main, - overflow: "visible", - // eslint-disable-next-line sort-keys -- disabling key order for readability - "&:after": { - backgroundColor: theme.palette.smoke.dark, - borderRadius: "12px 12px 0 0", - bottom: -3, - content: '""', - height: 3, - left: 0, - position: "absolute", - width: "100%", - }, - }, - // eslint-disable-next-line sort-keys -- disabling key order for readability "&.Mui-selected": { color: theme.palette.ink.main, - // eslint-disable-next-line sort-keys -- disabling key order for readability - "&:hover": { - overflow: "unset", - // eslint-disable-next-line sort-keys -- disabling key order for readability - "&:after": { - content: "none", - }, - }, }, // eslint-disable-next-line sort-keys -- disabling key order for readability "& > .MuiTab-iconWrapper": { @@ -1402,6 +1378,39 @@ export const MuiTabs = (theme: Theme): Components["MuiTabs"] => { styleOverrides: { flexContainer: { gap: 8, + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&:not(.MuiTabs-flexContainerVertical)": { + // eslint-disable-next-line sort-keys -- disabling key order for readability + ".MuiTab-root": { + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&:hover": { + color: theme.palette.ink.main, + overflow: "visible", + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&:after": { + backgroundColor: theme.palette.smoke.dark, + borderRadius: "12px 12px 0 0", + bottom: -3, + content: '""', + height: 3, + left: 0, + position: "absolute", + width: "100%", + }, + }, + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&.Mui-selected": { + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&:hover": { + overflow: "unset", + // eslint-disable-next-line sort-keys -- disabling key order for readability + "&:after": { + content: "none", + }, + }, + }, + }, + }, }, indicator: { borderTopLeftRadius: 12,