Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UI - update tabs view #3989

Merged
merged 17 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions ui/components/SubRouterTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { formatURL } from "../lib/nav";
import Flex from "./Flex";
import Link from "./Link";
import MuiTab from "./MuiTab";
import Spacer from "./Spacer";

type Props = {
className?: string;
Expand Down Expand Up @@ -73,7 +72,7 @@ function SubRouterTabs({ className, children, rootPath, clearQuery }: Props) {
}));

return (
<Flex wide tall column start className={className}>
<Flex wide tall column start className={className} gap="12">
<Tabs
indicatorColor="primary"
value={routesToIndex(routes, window.location.pathname)}
Expand All @@ -91,7 +90,6 @@ function SubRouterTabs({ className, children, rootPath, clearQuery }: Props) {
);
})}
</Tabs>
<Spacer padding="xs" />
<Switch>
{children}
<Redirect from="*" to={formatURL(rootPath, clearQuery ? "" : query)} />
Expand All @@ -100,4 +98,26 @@ function SubRouterTabs({ className, children, rootPath, clearQuery }: Props) {
);
}

export default styled(SubRouterTabs).attrs({ className: SubRouterTabs.name })``;
export default styled(SubRouterTabs).attrs({ className: SubRouterTabs.name })`
//MuiTabs
.horizontal-tabs {
min-height: ${(props) => props.theme.spacing.large};
width: 100%;
.MuiTabs-flexContainer {
border-bottom: 3px solid ${(props) => props.theme.colors.neutral20};
.MuiTab-root {
line-height: 1;
letter-spacing: 1px;
min-height: 32px;
width: fit-content;
@media (min-width: 600px) {
min-width: 132px;
}
}
}
.MuiTabs-indicator {
height: 0;
border-block-end: 3px solid ${(props) => props.theme.colors.primary};
}
}
`;
25 changes: 0 additions & 25 deletions ui/lib/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,30 +201,6 @@ export const GlobalStyle = createGlobalStyle`
::-webkit-scrollbar-thumb:hover {
background-color: ${(props) => props.theme.colors.neutral30};
}
//MuiTabs
.horizontal-tabs {
.MuiTab-root {
line-height: 1;
letter-spacing: 1px;
height: 32px;
min-height: 32px;
width: fit-content;
@media (min-width: 600px) {
min-width: 132px;
}
}
.MuiTabs-root {
min-height: 32px;
margin: ${(props) => props.theme.spacing.xs} 0;
}
.MuiTabs-fixed {
height: 32px;
}
.MuiTabs-indicator {
height: 3px;
background-color: ${(props) => props.theme.colors.primary};
}
}
//prevents white autofill background in dark mode
input:-webkit-autofill,
input:-webkit-autofill:hover,
Expand All @@ -233,7 +209,6 @@ input:-webkit-autofill:focus {
props.theme.mode === ThemeTypes.Dark &&
`background-color: ${props.theme.colors.blueWithOpacity};`}
}

`;

export const muiTheme = (colors, mode) =>
Expand Down