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

feat: Styling for autocomplete on upload #3036

Merged
merged 1 commit into from
Apr 18, 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 @@ -18,7 +18,7 @@ import TextField from "@mui/material/TextField";
import Typography from "@mui/material/Typography";
import capitalize from "lodash/capitalize";
import React, { forwardRef, PropsWithChildren, useMemo, useState } from "react";
import { focusStyle } from "theme";
import { borderedFocusStyle } from "theme";

import { FileUploadSlot } from "../FileUpload/Public";
import {
Expand Down Expand Up @@ -65,7 +65,7 @@ const StyledAutocomplete = styled(

const StyledTextField = styled(TextField)(({ theme }) => ({
"&:focus-within": {
...focusStyle,
...borderedFocusStyle,
[`& .${outlinedInputClasses.notchedOutline}`]: {
border: "1px solid transparent !important",
},
Expand Down Expand Up @@ -126,9 +126,9 @@ const renderGroup: AutocompleteProps<
<List key={`group-${key}`} role="group" sx={{ paddingY: 0 }}>
<ListSubheader
role="presentation"
disableSticky
sx={(theme) => ({
borderTop: 1,
borderBottom: 1,
borderColor: theme.palette.border.main,
})}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ interface Props extends FileUploadSlot {

const Root = styled(Box)(({ theme }) => ({
border: `1px solid ${theme.palette.border.main}`,
marginBottom: theme.spacing(1),
marginTop: theme.spacing(2),
marginBottom: theme.spacing(0.5),
marginTop: theme.spacing(5),
}));

const FileCard = styled(Box)(({ theme }) => ({
Expand Down
8 changes: 8 additions & 0 deletions editor.planx.uk/src/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,14 @@ 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
Loading