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

style: Filter column widths #4272

Merged
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
1 change: 1 addition & 0 deletions editor.planx.uk/src/ui/editor/Filter/Filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export const Filters = <T extends object>({
<fieldset
key={option.displayName}
aria-describedby={`${option.displayName}-description`}
style={{ flexBasis: "20%" }}
>
<div
key={`${option.displayName}-description`}
Expand Down
9 changes: 2 additions & 7 deletions editor.planx.uk/src/ui/editor/Filter/FiltersColumn.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,11 @@
import Box from "@mui/material/Box";
import { styled } from "@mui/material/styles";
import Typography from "@mui/material/Typography";
import { capitalize, get } from "lodash";
import React from "react";
import ChecklistItem from "ui/shared/ChecklistItem/ChecklistItem";

import Filters, { FilterKey, FilterValues } from "./Filter";

const Column = styled(Box)(() => ({
flexBasis: "20%",
}));

interface FiltersColumnProps<T> {
title: string;
optionKey: FilterKey<T>;
Expand All @@ -23,7 +18,7 @@ export const FiltersColumn = <T extends object>(
props: FiltersColumnProps<T>,
) => {
return (
<Column>
<Box>
<Typography component={"legend"} variant="h5" pb={0.5}>
{props.title}
</Typography>
Expand All @@ -37,6 +32,6 @@ export const FiltersColumn = <T extends object>(
variant="compact"
/>
))}
</Column>
</Box>
);
};
Loading