Refactored pages styling 2/3
This commit is contained in:
1 parent
b34a17004b
commit
05ffb3d270
20 files changed
+295
-178
No files matched your search
@@ -13,6 +13,7 @@ import Field from "../../../Components/Inputs/Field";
|
||||
import { maintenanceWindowValidation } from "../../../Validation/validation";
|
||||
import { logger } from "../../../Utils/Logger";
|
||||
import { createToast } from "../../../Utils/toastUtils";
|
||||
import { useTheme } from "@emotion/react";
|
||||
|
||||
const directory = {
|
||||
title: "Create a maintenance window",
|
||||
@@ -56,6 +57,8 @@ const durationOptions = [
|
||||
];
|
||||
|
||||
const CreateNewMaintenanceWindow = () => {
|
||||
const theme = useTheme();
|
||||
|
||||
const [values, setValues] = useState({
|
||||
repeat: 1,
|
||||
date: dayjs(),
|
||||
@@ -159,7 +162,11 @@ const CreateNewMaintenanceWindow = () => {
|
||||
{
|
||||
title: "Duration",
|
||||
component: (
|
||||
<Stack className="duration-config" gap={2} direction="row">
|
||||
<Stack
|
||||
className="duration-config"
|
||||
gap={theme.spacing(5)}
|
||||
direction="row"
|
||||
>
|
||||
<Field
|
||||
id="duration-value"
|
||||
placeholder="60"
|
||||
@@ -195,7 +202,7 @@ const CreateNewMaintenanceWindow = () => {
|
||||
<Stack
|
||||
className="add-monitors-fields"
|
||||
sx={{ width: "60%", maxWidth: "380px" }}
|
||||
gap={2}
|
||||
gap={theme.spacing(5)}
|
||||
>
|
||||
<Field
|
||||
id="add-monitors"
|
||||
@@ -208,7 +215,7 @@ const CreateNewMaintenanceWindow = () => {
|
||||
sx={{
|
||||
width: "fit-content",
|
||||
fontSize: "var(--env-var-font-size-small)",
|
||||
borderBottom: "1px dashed var(--env-var-color-3)",
|
||||
borderBottom: `1px dashed ${theme.palette.common.main}`,
|
||||
paddingBottom: "4px",
|
||||
}}
|
||||
>
|
||||
@@ -221,15 +228,15 @@ const CreateNewMaintenanceWindow = () => {
|
||||
|
||||
return (
|
||||
<div className="create-maintenance-window">
|
||||
<Stack gap={3}>
|
||||
<Stack gap={theme.spacing(10)}>
|
||||
<Button
|
||||
id="btn-back"
|
||||
sx={{
|
||||
width: "100px",
|
||||
height: "30px",
|
||||
gap: "10px",
|
||||
backgroundColor: "var(--env-var-color-32)",
|
||||
color: "var(--env-var-color-5)",
|
||||
backgroundColor: theme.palette.background.fill,
|
||||
color: theme.palette.text.secondary,
|
||||
}}
|
||||
label="Back"
|
||||
level="tertiary"
|
||||
@@ -239,8 +246,8 @@ const CreateNewMaintenanceWindow = () => {
|
||||
<Typography
|
||||
sx={{
|
||||
fontSize: "var(--env-var-font-size-large)",
|
||||
fontWeight: "600",
|
||||
color: "var(--env-var-color-5)",
|
||||
fontWeight: 600,
|
||||
color: theme.palette.text.secondary,
|
||||
}}
|
||||
>
|
||||
{directory.title}
|
||||
@@ -252,14 +259,14 @@ const CreateNewMaintenanceWindow = () => {
|
||||
</Box>
|
||||
<Stack
|
||||
className="maintenance-options"
|
||||
gap={5}
|
||||
paddingY={4}
|
||||
paddingX={8}
|
||||
paddingBottom={10}
|
||||
gap={theme.spacing(20)}
|
||||
paddingY={theme.spacing(15)}
|
||||
paddingX={theme.spacing(20)}
|
||||
sx={{
|
||||
border: "1px solid var(--env-var-color-16)",
|
||||
borderRadius: "var(--env-var-radius-1)",
|
||||
backgroundColor: "var(--env-var-color-0)",
|
||||
border: 1,
|
||||
borderColor: theme.palette.border.light,
|
||||
borderRadius: theme.shape.borderRadius,
|
||||
backgroundColor: theme.palette.background.main,
|
||||
}}
|
||||
>
|
||||
{configOptions.map((item, index) => (
|
||||
|
||||
@@ -3,7 +3,7 @@ import { useTheme } from "@emotion/react";
|
||||
import Fallback from "../../Components/Fallback";
|
||||
import "./index.css";
|
||||
|
||||
const Maintenance = () => {
|
||||
const Maintenance = ({ isAdmin }) => {
|
||||
const theme = useTheme();
|
||||
|
||||
return (
|
||||
@@ -29,6 +29,7 @@ const Maintenance = () => {
|
||||
"Stop sending alerts in maintenance windows",
|
||||
]}
|
||||
link="/maintenance/create"
|
||||
isAdmin={isAdmin}
|
||||
/>
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in new issue
Block a user