diff --git a/editor.planx.uk/src/@planx/components/Calculate/Editor.tsx b/editor.planx.uk/src/@planx/components/Calculate/Editor.tsx
index 3cb8da3c9a..cce4fe5d6d 100644
--- a/editor.planx.uk/src/@planx/components/Calculate/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Calculate/Editor.tsx
@@ -1,6 +1,4 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
import { styled } from "@mui/material/styles";
-import Switch from "@mui/material/Switch";
import Typography from "@mui/material/Typography";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { EditorProps } from "@planx/components/shared/types";
@@ -12,6 +10,7 @@ import ModalSection from "ui/editor/ModalSection";
import ModalSectionContent from "ui/editor/ModalSectionContent";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import type { Calculate } from "./model";
@@ -135,20 +134,16 @@ export default function Component(props: Props) {
/>
-
- formik.setFieldValue(
- "formatOutputForAutomations",
- !formik.values.formatOutputForAutomations,
- )
- }
- />
- }
- label="Format the output to automate a future Question or Checklist only"
- />
+
+ formik.setFieldValue(
+ "formatOutputForAutomations",
+ !formik.values.formatOutputForAutomations
+ )
+ }
+ label="Format the output to automate a future Question or Checklist only"
+ />
diff --git a/editor.planx.uk/src/@planx/components/Checklist/Editor.tsx b/editor.planx.uk/src/@planx/components/Checklist/Editor.tsx
index 28bbda8ce5..28ab81d939 100644
--- a/editor.planx.uk/src/@planx/components/Checklist/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Checklist/Editor.tsx
@@ -3,7 +3,6 @@ import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
import FormControlLabel from "@mui/material/FormControlLabel";
import IconButton from "@mui/material/IconButton";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { useFormik } from "formik";
import adjust from "ramda/src/adjust";
@@ -22,6 +21,7 @@ import SimpleMenu from "ui/editor/SimpleMenu";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
+import { Switch } from "ui/shared/Switch";
import { Option, parseBaseNodeData } from "../shared";
import { FlagsSelect } from "../shared/FlagsSelect";
@@ -368,52 +368,40 @@ export const ChecklistComponent: React.FC = (props) => {
/>
-
- formik.setValues({
- ...formik.values,
- ...toggleExpandableChecklist({
- options: formik.values.options,
- groupedOptions: formik.values.groupedOptions,
- }),
- })
- }
- />
- }
- label="Expandable"
- />
+
+ formik.setValues({
+ ...formik.values,
+ ...toggleExpandableChecklist({
+ options: formik.values.options,
+ groupedOptions: formik.values.groupedOptions,
+ }),
+ })
+ }
+ label="Expandable"
+ />
-
- formik.setFieldValue(
- "allRequired",
- !formik.values.allRequired,
- )
- }
- />
+
+ formik.setFieldValue(
+ "allRequired",
+ !formik.values.allRequired,
+ )
}
- label="All required"
- />
+ label="All required"
+ />
-
- formik.setFieldValue(
- "neverAutoAnswer",
- !formik.values.neverAutoAnswer,
- )
- }
- />
+
+ formik.setFieldValue(
+ "neverAutoAnswer",
+ !formik.values.neverAutoAnswer
+ )
}
label="Always put to user (forgo automation)"
/>
diff --git a/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx b/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx
index 01bbfb47f0..c8b11161ab 100644
--- a/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/DrawBoundary/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { EditorProps } from "@planx/components/shared/types";
import { useFormik } from "formik";
@@ -11,6 +9,7 @@ import ModalSectionContent from "ui/editor/ModalSectionContent";
import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import type { DrawBoundary } from "./model";
@@ -99,17 +98,13 @@ function DrawBoundaryComponent(props: Props) {
/>
-
- formik.setFieldValue(
- "hideFileUpload",
- !formik.values.hideFileUpload,
- )
- }
- />
+
+ formik.setFieldValue(
+ "hideFileUpload",
+ !formik.values.hideFileUpload,
+ )
}
label="Hide file upload and allow user to continue without data"
/>
diff --git a/editor.planx.uk/src/@planx/components/Feedback/Editor/Editor.tsx b/editor.planx.uk/src/@planx/components/Feedback/Editor/Editor.tsx
index 633359c209..ba030ede3d 100644
--- a/editor.planx.uk/src/@planx/components/Feedback/Editor/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Feedback/Editor/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { ICONS } from "@planx/components/shared/icons";
import { EditorProps } from "@planx/components/shared/types";
@@ -13,6 +11,7 @@ import ModalSectionContent from "ui/editor/ModalSectionContent";
import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import {
descriptionPlaceholder,
@@ -96,17 +95,13 @@ export const FeedbackEditor = (props: FeedbackEditorProps) => {
-
- formik.setFieldValue(
- "feedbackRequired",
- !formik.values.feedbackRequired,
- )
- }
- />
+
+ formik.setFieldValue(
+ "feedbackRequired",
+ !formik.values.feedbackRequired,
+ )
}
label="Feedback required"
/>
diff --git a/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Editor.tsx b/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Editor.tsx
index b769d7a563..c6ba042045 100644
--- a/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/FileUploadAndLabel/Editor.tsx
@@ -1,10 +1,8 @@
import RuleIcon from "@mui/icons-material/Rule";
import Box from "@mui/material/Box";
import Divider from "@mui/material/Divider";
-import FormControlLabel from "@mui/material/FormControlLabel";
import MenuItem from "@mui/material/MenuItem";
import { styled } from "@mui/material/styles";
-import Switch from "@mui/material/Switch";
import Typography from "@mui/material/Typography";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { EditorProps } from "@planx/components/shared/types";
@@ -24,6 +22,7 @@ import SelectInput from "ui/editor/SelectInput/SelectInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import {
@@ -90,17 +89,13 @@ function FileUploadAndLabelComponent(props: Props) {
/>
-
- formik.setFieldValue(
- "hideDropZone",
- !formik.values.hideDropZone,
- )
- }
- />
+
+ formik.setFieldValue(
+ "hideDropZone",
+ !formik.values.hideDropZone,
+ )
}
label="Hide the drop zone and show files list for information only"
/>
diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Editor.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Editor.tsx
index 2cfee8fd4e..31aeb533a3 100644
--- a/editor.planx.uk/src/@planx/components/FindProperty/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/FindProperty/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { EditorProps } from "@planx/components/shared/types";
import { useFormik } from "formik";
@@ -12,6 +10,7 @@ import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import type { FindProperty } from "./model";
@@ -58,17 +57,13 @@ function FindPropertyComponent(props: Props) {
-
- formik.setFieldValue(
- "allowNewAddresses",
- !formik.values.allowNewAddresses,
- )
- }
- />
+
+ formik.setFieldValue(
+ "allowNewAddresses",
+ !formik.values.allowNewAddresses,
+ )
}
label="Allow users to plot new addresses without a UPRN"
/>
diff --git a/editor.planx.uk/src/@planx/components/Notice/Editor.tsx b/editor.planx.uk/src/@planx/components/Notice/Editor.tsx
index 3988ad511a..b08f45d86b 100644
--- a/editor.planx.uk/src/@planx/components/Notice/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Notice/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import type { Notice } from "@planx/components/Notice/model";
import { parseNotice } from "@planx/components/Notice/model";
@@ -12,6 +10,7 @@ import ModalSectionContent from "ui/editor/ModalSectionContent";
import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import { InternalNotes } from "../../../ui/editor/InternalNotes";
import { MoreInformation } from "../../../ui/editor/MoreInformation/MoreInformation";
@@ -70,17 +69,13 @@ const NoticeEditor: React.FC = (props) => {
}}
/>
-
- props.onChange({
- ...props.value,
- resetButton: !props.value.resetButton,
- })
- }
- />
+
+ props.onChange({
+ ...props.value,
+ resetButton: !props.value.resetButton,
+ })
}
label="Reset to start of service"
/>
diff --git a/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx b/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx
index 7ba24d3cff..b01ac0882c 100644
--- a/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/NumberInput/Editor.tsx
@@ -1,5 +1,4 @@
import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import type { NumberInput } from "@planx/components/NumberInput/model";
import { parseNumberInput } from "@planx/components/NumberInput/model";
@@ -14,6 +13,7 @@ import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
import InputRowLabel from "ui/shared/InputRowLabel";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
@@ -75,17 +75,13 @@ export default function NumberInputComponent(props: Props): FCReturn {
-
- formik.setFieldValue(
- "allowNegatives",
- !formik.values.allowNegatives,
- )
- }
- />
+
+ formik.setFieldValue(
+ "allowNegatives",
+ !formik.values.allowNegatives,
+ )
}
label="Allow negative numbers to be input"
/>
diff --git a/editor.planx.uk/src/@planx/components/Pay/Editor.tsx b/editor.planx.uk/src/@planx/components/Pay/Editor.tsx
index 2efb9c7b83..173e206437 100644
--- a/editor.planx.uk/src/@planx/components/Pay/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Pay/Editor.tsx
@@ -2,7 +2,6 @@ import DataObjectIcon from "@mui/icons-material/DataObject";
import Box from "@mui/material/Box";
import FormControlLabel from "@mui/material/FormControlLabel";
import Link from "@mui/material/Link";
-import Switch from "@mui/material/Switch";
import Typography from "@mui/material/Typography";
import {
ComponentType as TYPES,
@@ -29,6 +28,7 @@ import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import ErrorWrapper from "ui/shared/ErrorWrapper";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import { EditorProps } from "../shared/types";
@@ -263,13 +263,9 @@ const Component: React.FC = (props: Props) => {
/>
- setFieldValue("hidePay", !values.hidePay)}
- />
- }
+ setFieldValue("hidePay", !values.hidePay)}
label="Hide the pay buttons and show fee for information only"
/>
@@ -353,17 +349,13 @@ const Component: React.FC = (props: Props) => {
-
- setFieldValue(
- "allowInviteToPay",
- !values.allowInviteToPay,
- )
- }
- />
+
+ setFieldValue(
+ "allowInviteToPay",
+ !values.allowInviteToPay,
+ )
}
label="Allow applicants to invite someone else to pay"
/>
diff --git a/editor.planx.uk/src/@planx/components/PropertyInformation/Editor.tsx b/editor.planx.uk/src/@planx/components/PropertyInformation/Editor.tsx
index a968492ae8..eb0958bc82 100644
--- a/editor.planx.uk/src/@planx/components/PropertyInformation/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/PropertyInformation/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { EditorProps } from "@planx/components/shared/types";
import { useFormik } from "formik";
@@ -10,6 +8,7 @@ import ModalSectionContent from "ui/editor/ModalSectionContent";
import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
+import { Switch } from "ui/shared/Switch";
import { ICONS } from "../shared/icons";
import { parseContent, PropertyInformation } from "./model";
@@ -54,17 +53,13 @@ function PropertyInformationComponent(props: Props) {
/>
-
- formik.setFieldValue(
- "showPropertyTypeOverride",
- !formik.values.showPropertyTypeOverride,
- )
- }
- />
+
+ formik.setFieldValue(
+ "showPropertyTypeOverride",
+ !formik.values.showPropertyTypeOverride,
+ )
}
label="Show users a 'change' link to override the property type"
/>
diff --git a/editor.planx.uk/src/@planx/components/Question/Editor.tsx b/editor.planx.uk/src/@planx/components/Question/Editor.tsx
index d9a33237e0..95b7e97d8c 100644
--- a/editor.planx.uk/src/@planx/components/Question/Editor.tsx
+++ b/editor.planx.uk/src/@planx/components/Question/Editor.tsx
@@ -1,5 +1,3 @@
-import FormControlLabel from "@mui/material/FormControlLabel";
-import Switch from "@mui/material/Switch";
import { ComponentType as TYPES } from "@opensystemslab/planx-core/types";
import { useFormik } from "formik";
import React, { useEffect, useRef } from "react";
@@ -13,6 +11,7 @@ import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
import Input from "ui/shared/Input/Input";
import InputRow from "ui/shared/InputRow";
import InputRowItem from "ui/shared/InputRowItem";
+import { Switch } from "ui/shared/Switch";
import { InternalNotes } from "../../../ui/editor/InternalNotes";
import { MoreInformation } from "../../../ui/editor/MoreInformation/MoreInformation";
@@ -204,17 +203,13 @@ export const Question: React.FC = (props) => {
/>
-
- formik.setFieldValue(
- "neverAutoAnswer",
- !formik.values.neverAutoAnswer,
- )
- }
- />
+
+ formik.setFieldValue(
+ "neverAutoAnswer",
+ !formik.values.neverAutoAnswer,
+ )
}
label="Always put to user (forgo automation)"
/>
diff --git a/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FooterLinksAndLegalDisclaimer.tsx b/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FooterLinksAndLegalDisclaimer.tsx
index a7f27c5608..4f62cf2385 100644
--- a/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FooterLinksAndLegalDisclaimer.tsx
+++ b/editor.planx.uk/src/pages/FlowEditor/components/Settings/ServiceSettings/FooterLinksAndLegalDisclaimer.tsx
@@ -1,10 +1,12 @@
import Box from "@mui/material/Box";
import Button from "@mui/material/Button";
+import FormControlLabel, { formControlLabelClasses } from "@mui/material/FormControlLabel";
import Switch, { SwitchProps } from "@mui/material/Switch";
import Typography from "@mui/material/Typography";
import { useFormik } from "formik";
import { useToast } from "hooks/useToast";
import React from "react";
+import { FONT_WEIGHT_BOLD } from "theme";
import InputGroup from "ui/editor/InputGroup";
import InputLegend from "ui/editor/InputLegend";
import RichTextInput from "ui/editor/RichTextInput/RichTextInput";
@@ -35,10 +37,18 @@ const TextInput: React.FC<{
return (
-
-
- {title}
-
+ }
+ />
{description && (