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

fix: Max out modal on smaller screens -- no margin #3100

Merged
merged 2 commits into from
May 2, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@ export const FileTaggingModal = ({
maxWidth="xl"
aria-labelledby="dialog-heading"
PaperProps={{
sx: {
sx: (theme) => ({
width: "100%",
maxWidth: (theme) => theme.breakpoints.values.md,
borderRadius: 0,
borderTop: (theme) => `20px solid ${theme.palette.primary.main}`,
background: "#FFF",
margin: (theme) => theme.spacing(2),
},
height: "100%",
[theme.breakpoints.down("sm")]: {
margin: 0,
maxHeight: "none",
},
}),
}}
>
<DialogContent>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ export const SelectMultiple = (props: SelectMultipleProps) => {
},
popper: {
sx: {
boxShadow: 10,
boxShadow: "0 0 10px 4px rgba(0, 0, 0, 0.5)",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this out of theme.ts as it was being applied across all popper instances and breaking tooltips.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for spotting this one

},
},
}}
Expand Down
10 changes: 1 addition & 9 deletions editor.planx.uk/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,6 @@ const getThemeOptions = ({
},
},
},
MuiPopper: {
styleOverrides: {
root: {
// Override default popover box-shadow to increase visual separation
boxShadow: "0 0 10px 4px rgba(0, 0, 0, 0.5) !important",
},
},
},
MuiContainer: {
styleOverrides: {
root: {
Expand Down Expand Up @@ -492,7 +484,7 @@ const generateTeamTheme = (
linkColour: DEFAULT_PRIMARY_COLOR,
logo: null,
favicon: null,
}
},
): MUITheme => {
const themeOptions = getThemeOptions(teamTheme);
const theme = responsiveFontSizes(createTheme(themeOptions), { factor: 3 });
Expand Down
Loading