From 5109153c9577c6546fa7c20401cefe196601adf6 Mon Sep 17 00:00:00 2001 From: Max Ghenis Date: Sun, 10 May 2026 17:46:15 -0400 Subject: [PATCH] Add PolicyEngine shell components --- changelog.d/policyengine-shell.added.md | 1 + src/layout/PolicyEngineFooter.tsx | 26 ++++++ src/layout/PolicyEngineHeader.tsx | 52 ++++++++++++ src/layout/PolicyEngineShell.tsx | 39 +++++++++ src/layout/PolicyEngineSiteConfig.ts | 102 ++++++++++++++++++++++++ src/layout/index.ts | 21 +++++ tests/layout/Layout.test.tsx | 39 +++++++++ 7 files changed, 280 insertions(+) create mode 100644 changelog.d/policyengine-shell.added.md create mode 100644 src/layout/PolicyEngineFooter.tsx create mode 100644 src/layout/PolicyEngineHeader.tsx create mode 100644 src/layout/PolicyEngineShell.tsx create mode 100644 src/layout/PolicyEngineSiteConfig.ts diff --git a/changelog.d/policyengine-shell.added.md b/changelog.d/policyengine-shell.added.md new file mode 100644 index 0000000..c71e9c0 --- /dev/null +++ b/changelog.d/policyengine-shell.added.md @@ -0,0 +1 @@ +Add canonical PolicyEngine header, footer, and shell components for child applications. diff --git a/src/layout/PolicyEngineFooter.tsx b/src/layout/PolicyEngineFooter.tsx new file mode 100644 index 0000000..bb5add4 --- /dev/null +++ b/src/layout/PolicyEngineFooter.tsx @@ -0,0 +1,26 @@ +import { Footer, type FooterProps } from './Footer'; +import { + DEFAULT_POLICYENGINE_BASE_URL, + getPolicyEngineFooterLinks, + type PolicyEngineCountryId, +} from './PolicyEngineSiteConfig'; + +export interface PolicyEngineFooterProps extends Omit { + country?: PolicyEngineCountryId; + baseUrl?: string; + links?: FooterProps['links']; +} + +export function PolicyEngineFooter({ + country = 'us', + baseUrl = DEFAULT_POLICYENGINE_BASE_URL, + links, + ...props +}: PolicyEngineFooterProps) { + return ( +