Skip to content

Commit a2514cc

Browse files
authored
Merge pull request #5660 from dfe-analytical-services/EES-5916
EES-5916 api notification banner
2 parents f53e218 + 3d8ed2e commit a2514cc

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

src/explore-education-statistics-common/src/components/NotificationBanner.tsx

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import React, { ReactNode } from 'react';
44

55
interface Props {
66
children?: ReactNode;
7+
className?: string;
78
fullWidthContent?: boolean;
89
heading?: string;
910
role?: 'region' | 'alert';
@@ -13,6 +14,7 @@ interface Props {
1314

1415
const NotificationBanner = ({
1516
children,
17+
className,
1618
fullWidthContent = false,
1719
heading,
1820
role = 'region',
@@ -24,6 +26,7 @@ const NotificationBanner = ({
2426
aria-labelledby="govuk-notification-banner-title"
2527
className={classNames(
2628
'govuk-notification-banner govuk-!-margin-bottom-6',
29+
className,
2730
{
2831
[styles.fullWidthContent]: fullWidthContent,
2932
[styles.error]: variant === 'error',

src/explore-education-statistics-frontend/src/components/Page.tsx

+28
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import PhaseBanner from '@common/components/PhaseBanner';
2+
import NotificationBanner from '@common/components/NotificationBanner';
23
import CookieBanner from '@frontend/components/CookieBanner';
34
import UserTestingBanner from '@frontend/components/UserTestingBanner';
45
import classNames from 'classnames';
@@ -9,6 +10,7 @@ import PageHeader from './PageHeader';
910
import PageMeta, { PageMetaProps } from './PageMeta';
1011
import PageTitle from './PageTitle';
1112
import Feedback from './Feedback';
13+
import Link from './Link';
1214

1315
type Props = {
1416
includeDefaultMetaTitle?: boolean;
@@ -22,6 +24,7 @@ type Props = {
2224
children?: ReactNode;
2325
wide?: boolean;
2426
isHomepage?: boolean;
27+
showApiBanner?: boolean;
2528
} & BreadcrumbsProps;
2629

2730
const Page = ({
@@ -37,6 +40,7 @@ const Page = ({
3740
wide = false,
3841
isHomepage = false,
3942
breadcrumbs = [],
43+
showApiBanner = true,
4044
}: Props) => {
4145
return (
4246
<>
@@ -57,6 +61,30 @@ const Page = ({
5761
})}
5862
>
5963
<PhaseBanner url="https://forms.office.com/Pages/ResponsePage.aspx?id=yXfS-grGoU2187O4s0qC-XMiKzsnr8xJoWM_DeGwIu9UNDJHOEJDRklTNVA1SDdLOFJITEwyWU1OQS4u" />
64+
65+
{showApiBanner && (
66+
<NotificationBanner
67+
className="govuk-!-margin-top-6"
68+
fullWidthContent
69+
title="Important update"
70+
>
71+
<p>
72+
The first data sets are now available in our new API,{' '}
73+
<Link to="/data-catalogue?dataSetType=api">
74+
view them in the data catalogue
75+
</Link>{' '}
76+
or read our{' '}
77+
<Link to="https://api.education.gov.uk/statistics/docs/ ">
78+
API documentation
79+
</Link>
80+
. If you have any questions or feedback, contact us at{' '}
81+
<a href="mailto:explore.statistics@education.gov.uk">
82+
explore.statistics@education.gov.uk
83+
</a>
84+
</p>
85+
</NotificationBanner>
86+
)}
87+
6088
<Breadcrumbs
6189
breadcrumbs={
6290
isHomepage

src/explore-education-statistics-frontend/src/modules/permalink/PermalinkPage.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const PermalinkPage: NextPage<Props> = ({ data }) => {
3535
title={`'${dataSetTitle}' from '${publicationTitle}'`}
3636
caption="Permanent data table"
3737
className={styles.permalinkPage}
38+
showApiBanner={false}
3839
wide
3940
breadcrumbs={[
4041
{ name: 'Data tables', link: '/data-tables' },

0 commit comments

Comments
 (0)