From 8d26049b17de7705e1ee2d39af3888fd152c5653 Mon Sep 17 00:00:00 2001 From: A Charlwood Date: Wed, 11 Feb 2026 01:04:51 +0000 Subject: [PATCH] Task 4: Add PatientBanner component with full/condensed modes - Create useScrollCondensation hook with IntersectionObserver - PatientBanner with 80px full mode and 48px condensed mode - Smooth height transition (200ms) on scroll past 100px - Status dot (green) and badge for 'Open to opportunities' - Action buttons: Download CV, Email, LinkedIn - NHS blue outlined buttons with hover fill effect - Proper GPhC number formatting with tooltip - Sticky positioning for persistent visibility --- src/components/PatientBanner.tsx | 189 +++++++++++++++++++++++++++++ src/hooks/useScrollCondensation.ts | 35 ++++++ 2 files changed, 224 insertions(+) create mode 100644 src/components/PatientBanner.tsx create mode 100644 src/hooks/useScrollCondensation.ts diff --git a/src/components/PatientBanner.tsx b/src/components/PatientBanner.tsx new file mode 100644 index 0000000..a3831c8 --- /dev/null +++ b/src/components/PatientBanner.tsx @@ -0,0 +1,189 @@ +import { Download, Mail, Linkedin } from 'lucide-react' +import { patient } from '@/data/patient' +import { useScrollCondensation } from '@/hooks/useScrollCondensation' + +export function PatientBanner() { + const { isCondensed, sentinelRef } = useScrollCondensation({ threshold: 100 }) + + return ( + <> +