stacking fields
This commit is contained in:
1 parent
9904626526
commit
3dbbe035a8
3 files changed
+8
-4
No files matched your search
@@ -1,6 +1,7 @@
|
|||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import { Select, Button } from "@/Components/v2/inputs";
|
import { Select, Button } from "@/Components/v2/inputs";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
||||||
|
|
||||||
import type { MonitorType } from "@/Types/Monitor";
|
import type { MonitorType } from "@/Types/Monitor";
|
||||||
import { Typography, useTheme } from "@mui/material";
|
import { Typography, useTheme } from "@mui/material";
|
||||||
@@ -27,11 +28,12 @@ export const FilterControls = ({
|
|||||||
onClearFilters: () => void;
|
onClearFilters: () => void;
|
||||||
}) => {
|
}) => {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
const isSmall = useMediaQuery(theme.breakpoints.down("md"));
|
||||||
const isFilterActive =
|
const isFilterActive =
|
||||||
selectedTypes.length > 0 || selectedStatus !== "" || selectedState !== "";
|
selectedTypes.length > 0 || selectedStatus !== "" || selectedState !== "";
|
||||||
return (
|
return (
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction={isSmall ? "column" : "row"}
|
||||||
gap={theme.spacing(2)}
|
gap={theme.spacing(2)}
|
||||||
>
|
>
|
||||||
<Select
|
<Select
|
||||||
|
|||||||
@@ -127,8 +127,9 @@ const UptimeMonitorsPage = () => {
|
|||||||
</Stack>
|
</Stack>
|
||||||
|
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction={isSmall ? "column" : "row"}
|
||||||
justifyContent={"space-between"}
|
justifyContent={isSmall ? "flex-start" : "space-between"}
|
||||||
|
gap={theme.spacing(4)}
|
||||||
>
|
>
|
||||||
<FilterControls
|
<FilterControls
|
||||||
selectedTypes={selectedTypes}
|
selectedTypes={selectedTypes}
|
||||||
|
|||||||
@@ -19,7 +19,8 @@
|
|||||||
"name": "Name",
|
"name": "Name",
|
||||||
"status": "Status",
|
"status": "Status",
|
||||||
"type": "Type"
|
"type": "Type"
|
||||||
}
|
},
|
||||||
|
"empty": "Nothing h"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"submit": "Submit",
|
"submit": "Submit",
|
||||||
|
|||||||
Reference in new issue
Block a user