Skip to content

Commit

Permalink
Fix filter paddings
Browse files Browse the repository at this point in the history
  • Loading branch information
tschumpr committed Jul 22, 2024
1 parent c4a77e1 commit 2232330
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { Button, Stack } from "@mui/material";

export const MenuItems = ({ reset }: MenuItemsProps) => {
return (
<Stack direction="row" justifyContent="space-around" sx={{ marginTop: 3 }}>
<Stack direction="row" justifyContent="space-around" sx={{ marginTop: "24px" }}>
<Button
sx={{ width: "100%", marginLeft: 0, height: "48px" }}
data-cy="reset-filter-button"
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/commons/menu/mainView/sideDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const SideDrawer = ({ drawerOpen, drawerContent }: SideDrawerProps) => {
<Paper
sx={{
width: "360px",
height: "calc(100vh - 70px)",
height: "calc(100vh - 84px)",
padding: "16px",
backgroundColor: theme.palette.background.lightgrey,
boxShadow: theme.palette.boxShadow + " 2px 6px 6px 0px",
Expand Down
2 changes: 1 addition & 1 deletion src/client/src/commons/search/editor/FilterChips.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const FilterChips = ({ activeFilters, setFilter }: FilterChipsProps) => {
};

return (
<Box sx={{ marginTop: "24px", marginBottom: "14px" }}>
<Box sx={{ marginBottom: "14px" }}>
{activeFilters.map((filter, index) => {
const filterLabel = filter.key === "role" ? t("status") : t(filter.key);
return (
Expand Down
7 changes: 5 additions & 2 deletions src/client/src/commons/search/editor/filterComponent.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import { FilterContext } from "../../../components/filter/filterContext.tsx";

class FilterComponent extends React.Component {
static contextType = FilterContext;

constructor(props) {
super(props);
this.handleFilterReset = this.handleFilterReset.bind(this);
Expand Down Expand Up @@ -183,13 +184,15 @@ class FilterComponent extends React.Component {

return (
<Stack direction="column" sx={{ height: "100%" }}>
<Box sx={{ flexGrow: 1, overflow: "auto", scrollbarGutter: "stable" }}>
<SideDrawerHeader title={t("searchfilters")} toggleDrawer={toggleDrawer} />
<SideDrawerHeader title={t("searchfilters")} toggleDrawer={toggleDrawer} />
{this.state.activeFilters.length > 0 && (
<FilterChips
setPolygonSelectionEnabled={setPolygonSelectionEnabled}
activeFilters={this.state.activeFilters}
setFilter={setFilter}
/>
)}
<Box sx={{ flexGrow: 1, overflow: "auto", scrollbarGutter: "stable" }}>
<Button
onClick={() => {
this.handlePolygonFilterClick();
Expand Down

0 comments on commit 2232330

Please sign in to comment.