diff --git a/editor.planx.uk/docs/adding-a-new-component.md b/editor.planx.uk/docs/adding-a-new-component.md index 453bbb47b2..45116943d6 100644 --- a/editor.planx.uk/docs/adding-a-new-component.md +++ b/editor.planx.uk/docs/adding-a-new-component.md @@ -66,7 +66,7 @@ type Props = PublicProps; function SetValueComponent(props: Props) { return ( - - = ({ return ( - - ; diff --git a/editor.planx.uk/src/@planx/components/DateInput/Public.tsx b/editor.planx.uk/src/@planx/components/DateInput/Public.tsx index 79850dead2..90e80d35d5 100644 --- a/editor.planx.uk/src/@planx/components/DateInput/Public.tsx +++ b/editor.planx.uk/src/@planx/components/DateInput/Public.tsx @@ -3,7 +3,7 @@ import { visuallyHidden } from "@mui/utils"; import { DateInput, paddedDate } from "@planx/components/DateInput/model"; import { dateRangeSchema } from "@planx/components/DateInput/model"; import Card from "@planx/components/shared/Preview/Card"; -import QuestionHeader from "@planx/components/shared/Preview/QuestionHeader"; +import CardHeader from "@planx/components/shared/Preview/CardHeader"; import { PublicProps } from "@planx/components/ui"; import { useFormik } from "formik"; import React from "react"; @@ -44,7 +44,7 @@ const DateInputPublic: React.FC = (props) => { .join(" ")} > {props.title} - - - = (props) => { return ( - - + {!props.hideDropZone && ( <> diff --git a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx index cf755932d6..3f91883a05 100644 --- a/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx +++ b/editor.planx.uk/src/@planx/components/FindProperty/Public/index.tsx @@ -4,7 +4,7 @@ import Link from "@mui/material/Link"; import { styled } from "@mui/material/styles"; import Typography from "@mui/material/Typography"; import Card from "@planx/components/shared/Preview/Card"; -import QuestionHeader from "@planx/components/shared/Preview/QuestionHeader"; +import CardHeader from "@planx/components/shared/Preview/CardHeader"; import { squareMetresToHectares } from "@planx/components/shared/utils"; import { PublicProps } from "@planx/components/ui"; import area from "@turf/area"; @@ -188,7 +188,7 @@ function Component(props: Props) { if (props.allowNewAddresses && page === "new-address") { return ( <> - @@ -219,7 +219,7 @@ function Component(props: Props) { // default to page === "os-address" return ( <> - diff --git a/editor.planx.uk/src/@planx/components/NextSteps/Public.tsx b/editor.planx.uk/src/@planx/components/NextSteps/Public.tsx index c76bdd3811..98e1dde77e 100644 --- a/editor.planx.uk/src/@planx/components/NextSteps/Public.tsx +++ b/editor.planx.uk/src/@planx/components/NextSteps/Public.tsx @@ -3,7 +3,7 @@ import React from "react"; import NextStepsList from "ui/public/NextStepsList"; import Card from "../shared/Preview/Card"; -import QuestionHeader from "../shared/Preview/QuestionHeader"; +import CardHeader from "../shared/Preview/CardHeader"; import { NextSteps } from "./model"; export type Props = PublicProps; @@ -11,7 +11,7 @@ export type Props = PublicProps; const NextStepsComponent: React.FC = (props) => { return ( - = (props) => { return ( <> - - ; @@ -181,7 +181,7 @@ function Component(props: Props) { /> ) : ( - @@ -206,8 +206,14 @@ export type PlanningConstraintsContentProps = { export function PlanningConstraintsContent( props: PlanningConstraintsContentProps, ) { - const { title, description, constraints, metadata, refreshConstraints, disclaimer } = - props; + const { + title, + description, + constraints, + metadata, + refreshConstraints, + disclaimer, + } = props; const error = constraints.error || undefined; const showError = error || !Object.values(constraints)?.length; @@ -221,7 +227,7 @@ export function PlanningConstraintsContent( return ( - + {showError && ( ( - + ); @@ -324,7 +333,7 @@ interface ConstraintsGraphErrorProps { const ConstraintsGraphError = (props: ConstraintsGraphErrorProps) => ( - + - +

A static map centred on the property address, showing the title diff --git a/editor.planx.uk/src/@planx/components/Question/Public/Question.tsx b/editor.planx.uk/src/@planx/components/Question/Public/Question.tsx index 42904a3cf0..9950bd496f 100644 --- a/editor.planx.uk/src/@planx/components/Question/Public/Question.tsx +++ b/editor.planx.uk/src/@planx/components/Question/Public/Question.tsx @@ -5,7 +5,7 @@ import RadioGroup from "@mui/material/RadioGroup"; import { useTheme } from "@mui/material/styles"; import { visuallyHidden } from "@mui/utils"; import Card from "@planx/components/shared/Preview/Card"; -import QuestionHeader from "@planx/components/shared/Preview/QuestionHeader"; +import CardHeader from "@planx/components/shared/Preview/CardHeader"; import BasicRadio from "@planx/components/shared/Radio/BasicRadio"; import DescriptionRadio from "@planx/components/shared/Radio/DescriptionRadio"; import ImageRadio from "@planx/components/shared/Radio/ImageRadio"; @@ -85,7 +85,7 @@ const Question: React.FC = (props) => { return ( - - + ( - + Application incomplete. diff --git a/editor.planx.uk/src/@planx/components/TaskList/Public.tsx b/editor.planx.uk/src/@planx/components/TaskList/Public.tsx index a90db30ea7..50a37eaab3 100644 --- a/editor.planx.uk/src/@planx/components/TaskList/Public.tsx +++ b/editor.planx.uk/src/@planx/components/TaskList/Public.tsx @@ -1,5 +1,5 @@ import Card from "@planx/components/shared/Preview/Card"; -import QuestionHeader from "@planx/components/shared/Preview/QuestionHeader"; +import CardHeader from "@planx/components/shared/Preview/CardHeader"; import type { TaskList } from "@planx/components/TaskList/model"; import { PublicProps } from "@planx/components/ui"; import React from "react"; @@ -10,7 +10,7 @@ export type Props = PublicProps; const TaskListComponent: React.FC = (props) => { return ( - = (props) => { return ( - ({ }, })); -const QuestionHeaderWrapper = styled(Box)(({ theme }) => ({ +const CardHeaderWrapper = styled(Box)(({ theme }) => ({ maxWidth: theme.breakpoints.values.formWrap, marginBottom: theme.spacing(1), })); @@ -51,7 +51,7 @@ export const Image = styled("img")(() => ({ maxWidth: "100%", })); -const QuestionHeader: React.FC = ({ +const CardHeader: React.FC = ({ title, description, info, @@ -70,7 +70,7 @@ const QuestionHeader: React.FC = ({ return ( <> - + {title && ( = ({ ) : undefined} {img && question} - + ); }; -export default QuestionHeader; +export default CardHeader; diff --git a/editor.planx.uk/src/pages/Preview/ResumePage.tsx b/editor.planx.uk/src/pages/Preview/ResumePage.tsx index 09510c7344..6f878f45e0 100644 --- a/editor.planx.uk/src/pages/Preview/ResumePage.tsx +++ b/editor.planx.uk/src/pages/Preview/ResumePage.tsx @@ -3,7 +3,7 @@ import Link from "@mui/material/Link"; import Typography from "@mui/material/Typography"; import { PaymentRequest } from "@opensystemslab/planx-core/types"; import Card from "@planx/components/shared/Preview/Card"; -import QuestionHeader from "@planx/components/shared/Preview/QuestionHeader"; +import CardHeader from "@planx/components/shared/Preview/CardHeader"; import axios from "axios"; import DelayedLoadingIndicator from "components/DelayedLoadingIndicator"; import { useFormik } from "formik"; @@ -62,10 +62,10 @@ export const EmailRequired: React.FC<{ setEmail: (email: string) => void }> = ({ return ( - + > - + >