fixed pageContainer width

This commit is contained in:
Carter 2024-11-19 11:15:40 -06:00
parent 61922f28ee
commit 952b3f6c4e
6 changed files with 20 additions and 15 deletions

View file

@ -15,3 +15,11 @@
--status-warning: #ffb74d; --status-warning: #ffb74d;
--status-alert: #f44336; --status-alert: #f44336;
} }
/* index.css or a global stylesheet */
html, body, #root {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}

View file

@ -1,8 +1,8 @@
import { AppBar, Box, IconButton, Theme, Toolbar } from "@mui/material"; import { AppBar, Box, IconButton, Theme, Toolbar } from "@mui/material";
import { Menu } from "@mui/icons-material"; import { Menu } from "@mui/icons-material";
import classNames from "classnames"; // import classNames from "classnames";
import { makeStyles } from "@mui/styles"; import { makeStyles } from "@mui/styles";
import { getDarkLogo, getLightLogo, getSignatureAccentColour, getSignatureColour, hasTransparentLogoBG, hideLogo } from "../services/whiteLabel"; import { getDarkLogo, getLightLogo, getSignatureAccentColour, hasTransparentLogoBG, hideLogo } from "../services/whiteLabel";
// import { Link } from "react-router-dom"; // import { Link } from "react-router-dom";
import { useThemeType } from "../hooks/useThemeType"; import { useThemeType } from "../hooks/useThemeType";
import UserMenu from "../user/UserMenu"; import UserMenu from "../user/UserMenu";
@ -11,6 +11,7 @@ const useStyles = makeStyles((theme: Theme) => ({
appBar: { appBar: {
zIndex: theme.zIndex.drawer + 1, zIndex: theme.zIndex.drawer + 1,
backgroundImage: "none", // This prevents de-saturation of header in dark mode backgroundImage: "none", // This prevents de-saturation of header in dark mode
// border: "1px solid purple"
}, },
toolbar: { toolbar: {
marginLeft: theme.spacing(0.5), marginLeft: theme.spacing(0.5),
@ -82,11 +83,10 @@ interface Props {
export default function Header(props: Props) { export default function Header(props: Props) {
const { sideIsOpen, openSide, toggleTheme } = props; // const { sideIsOpen, openSide, toggleTheme } = props;
const { openSide, toggleTheme } = props;
const themeType = useThemeType(); const themeType = useThemeType();
const classes = useStyles() const classes = useStyles()
console.log(getSignatureColour())
return ( return (
<AppBar position="fixed" className={classes.appBar}> <AppBar position="fixed" className={classes.appBar}>

View file

@ -51,7 +51,6 @@ const useStyles = makeStyles((theme: Theme) => ({
paddingLeft: theme.spacing(3), paddingLeft: theme.spacing(3),
paddingRight: theme.spacing(3) paddingRight: theme.spacing(3)
}, },
color: theme.palette.mode === "light" ? "white" : "black"
}, },
activeItem: activeItem:
theme.palette.mode === "light" theme.palette.mode === "light"

View file

@ -5,7 +5,6 @@ import React, { PropsWithChildren } from "react";
const useStyles = makeStyles((theme: Theme) => ({ const useStyles = makeStyles((theme: Theme) => ({
pageContainer: { pageContainer: {
// border: "1px solid red",
width: "100%", width: "100%",
overflowX: "hidden", overflowX: "hidden",
overflowY: "auto", overflowY: "auto",
@ -42,9 +41,9 @@ interface Props extends PropsWithChildren{
export const PageContainer: React.FunctionComponent<Props> = props => { export const PageContainer: React.FunctionComponent<Props> = props => {
const classes = useStyles(); const classes = useStyles();
const { children } = props; const { children, fullViewport, isCenterCenter } = props;
let fullViewport = false // let fullViewport = false
let isCenterCenter = false // let isCenterCenter = false
return ( return (
<Container <Container
className={classNames( className={classNames(
@ -52,7 +51,7 @@ export const PageContainer: React.FunctionComponent<Props> = props => {
isCenterCenter && classes.centerCenter isCenterCenter && classes.centerCenter
)} )}
disableGutters disableGutters
// maxWidth={true} maxWidth={false}
children={<React.Fragment>{children}</React.Fragment>} children={<React.Fragment>{children}</React.Fragment>}
/> />
); );

View file

@ -9,7 +9,6 @@ export default function Teams() {
<PageContainer> <PageContainer>
<Box paddingY={isMobile ? 0.5 : 1} paddingX={isMobile ? 1 : 2}> <Box paddingY={isMobile ? 0.5 : 1} paddingX={isMobile ? 1 : 2}>
<TeamList /> <TeamList />
{/* Teams! */}
</Box> </Box>
</PageContainer> </PageContainer>
); );

View file

@ -1,5 +1,5 @@
import * as Colours from "@mui/material/colors" import * as Colours from "@mui/material/colors"
import { createTheme, darken, lighten, responsiveFontSizes, Theme, ThemeOptions } from '@mui/material/styles'; import { createTheme, responsiveFontSizes, Theme, ThemeOptions } from '@mui/material/styles';
import { import {
getPrimaryColour, getPrimaryColour,
getSecondaryColour, getSecondaryColour,
@ -198,7 +198,7 @@ function options(themeType: "light" | "dark"): ThemeOptions {
// color: "white" // color: "white"
}, },
'&:hover': { '&:hover': {
color: themeType === "light" ? signature : "white", // Customize ripple color here color: themeType === "light" ? signature : "black",
// color: "white" // color: "white"
}, },
}, },