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

PRMP-1332 - single element are being placed in groups/lists #482

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
10 changes: 3 additions & 7 deletions app/src/components/generic/recordMenuCard/RecordMenuCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,9 @@ const SideMenuSubSection = ({ actionLinks, heading, setStage }: SubSectionProps)
return (
<>
<h2 className="nhsuk-heading-m">{heading}</h2>
<ol>
{actionLinks.map((link) => (
<li key={link.key}>
<LinkItem link={link} setStage={setStage} />
</li>
))}
</ol>
{actionLinks.map((link) => (
<LinkItem key={link.key} link={link} setStage={setStage} />
))}
</>
);
};
Expand Down
49 changes: 23 additions & 26 deletions app/src/pages/patientSearchPage/PatientSearchPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { routes } from '../../types/generic/routes';
import { FieldValues, useForm } from 'react-hook-form';
import ErrorBox from '../../components/layout/errorBox/ErrorBox';
import { Button, Fieldset, Input } from 'nhsuk-react-components';
import { Button, Input } from 'nhsuk-react-components';
import SpinnerButton from '../../components/generic/spinnerButton/SpinnerButton';
import { InputRef } from '../../types/generic/inputRef';
import { useNavigate } from 'react-router-dom';
Expand Down Expand Up @@ -107,32 +107,29 @@ function PatientSearchPage() {
)}
</>
)}
<h1>{pageTitle}</h1>
oliverbeumkes-nhs marked this conversation as resolved.
Show resolved Hide resolved
<form onSubmit={handleSubmit(handleSearch, handleError)} noValidate>
<Fieldset>
<Fieldset.Legend headingLevel="h1" isPageHeading>
{pageTitle}
</Fieldset.Legend>
<Input
id="nhs-number-input"
data-testid="nhs-number-input"
label="Enter NHS number"
hint="A 10-digit number, for example, 485 777 3456"
type="text"
{...searchProps}
error={
submissionState !== SEARCH_STATES.SEARCHING && inputError
? inputError
: false
}
name="nhsNumber"
inputRef={nhsNumberRef as InputRef}
readOnly={
submissionState === SEARCH_STATES.SUCCEEDED ||
submissionState === SEARCH_STATES.SEARCHING
}
autoComplete="off"
/>
</Fieldset>
<Input
id="nhs-number-input"
data-testid="nhs-number-input"
label="Enter NHS number"
hint="A 10-digit number, for example, 485 777 3456"
type="text"
{...searchProps}
error={
submissionState !== SEARCH_STATES.SEARCHING && inputError
? inputError
: false
}
name="nhsNumber"
inputRef={nhsNumberRef as InputRef}
readOnly={
submissionState === SEARCH_STATES.SUCCEEDED ||
submissionState === SEARCH_STATES.SEARCHING
}
autoComplete="off"
/>

{submissionState === SEARCH_STATES.SEARCHING ? (
<SpinnerButton
id="patient-search-spinner"
Expand Down
10 changes: 3 additions & 7 deletions app/src/styles/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -288,13 +288,9 @@ $hunit: '%';
&-content {
padding: 24px;

ol {
padding-left: 0;

li {
font-size: 1rem;
list-style-type: none;
}
a {
display: inline-block;
margin-bottom: 24px;
}
}
}
Expand Down
Loading