Skip to content

Commit

Permalink
fix(style): Fixed overflow not overflowing on pages
Browse files Browse the repository at this point in the history
  • Loading branch information
scottbenton committed Dec 16, 2023
1 parent 58e8157 commit a4d7e1b
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/components/shared/Layout/PageContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function PageContent(props: PageContentProps) {
borderRadius: isPaper ? `${theme.shape.borderRadius}px` : 0,
borderBottomLeftRadius: 0,
borderBottomRightRadius: 0,
overflow: "clip",
flexGrow: 1,

pb: 2,
Expand Down
18 changes: 11 additions & 7 deletions src/components/shared/StyledTabs/StyledTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Tabs, TabsProps } from "@mui/material";
export interface StyledTabsProps extends TabsProps {}

export function StyledTabs(props: StyledTabsProps) {
const { sx, ...otherProps } = props;
return (
<Tabs
TabIndicatorProps={{
Expand All @@ -21,16 +22,19 @@ export function StyledTabs(props: StyledTabsProps) {
alignSelf: "stretch",
},
}}
sx={(theme) => ({
py: 0,
backgroundColor: theme.palette.background.paperInlay,
borderBottom: `1px solid ${theme.palette.divider}`,
alignItems: "center",
})}
sx={[
(theme) => ({
py: 0,
backgroundColor: theme.palette.background.paperInlay,
borderBottom: `1px solid ${theme.palette.divider}`,
alignItems: "center",
}),
...(Array.isArray(sx) ? sx : [sx]),
]}
variant={"scrollable"}
scrollButtons
allowScrollButtonsMobile
{...props}
{...otherProps}
/>
);
}
4 changes: 4 additions & 0 deletions src/pages/Homebrew/HomebrewEditorPage/HomebrewEditorPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ export function HomebrewEditorPage() {
<StyledTabs
value={selectedTab}
onChange={(evt, value) => handleTabChange(value)}
sx={(theme) => ({
borderTopRightRadius: theme.shape.borderRadius,
borderTopLeftRadius: theme.shape.borderRadius,
})}
>
<StyledTab label={"About"} value={TABS.ABOUT} />
<StyledTab label={"Moves"} value={TABS.MOVES} />
Expand Down
4 changes: 4 additions & 0 deletions src/pages/World/WorldSheetPage/WorldSheetPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ export function WorldSheetPage() {
indicatorColor="primary"
centered
variant={"standard"}
sx={(theme) => ({
borderTopRightRadius: theme.shape.borderRadius,
borderTopLeftRadius: theme.shape.borderRadius,
})}
>
<StyledTab value={TABS.DETAILS} label={"World Details"} />
{!showSectorsInsteadOfLocations && (
Expand Down

0 comments on commit a4d7e1b

Please sign in to comment.