diff --git a/src/components/Sidebar.tsx b/src/components/Sidebar.tsx new file mode 100644 index 0000000..eb201cb --- /dev/null +++ b/src/components/Sidebar.tsx @@ -0,0 +1,432 @@ +import { AlertTriangle, AlertCircle } from 'lucide-react' +import { patient } from '@/data/patient' +import { tags } from '@/data/tags' +import { alerts } from '@/data/alerts' +import type { Tag, Alert } from '@/types/pmr' + +interface SectionTitleProps { + children: React.ReactNode +} + +function SectionTitle({ children }: SectionTitleProps) { + return ( +
+ {children} +
+
+ ) +} + +interface TagPillProps { + tag: Tag +} + +function TagPill({ tag }: TagPillProps) { + const styles: Record = { + teal: { + background: 'var(--accent-light)', + color: 'var(--accent)', + border: '1px solid var(--accent-border)', + }, + amber: { + background: 'var(--amber-light)', + color: 'var(--amber)', + border: '1px solid var(--amber-border)', + }, + green: { + background: 'var(--success-light)', + color: 'var(--success)', + border: '1px solid var(--success-border)', + }, + } + + return ( + + {tag.label} + + ) +} + +interface AlertFlagProps { + alert: Alert +} + +function AlertFlag({ alert }: AlertFlagProps) { + const Icon = alert.icon === 'AlertTriangle' ? AlertTriangle : AlertCircle + + const styles: Record = { + alert: { + background: 'var(--alert-light)', + color: 'var(--alert)', + border: '1px solid var(--alert-border)', + }, + amber: { + background: 'var(--amber-light)', + color: 'var(--amber)', + border: '1px solid var(--amber-border)', + }, + } + + return ( +
+
+ +
+ {alert.message} +
+ ) +} + +export default function Sidebar() { + return ( + + ) +} diff --git a/src/index.css b/src/index.css index 2c89741..f1f8b24 100644 --- a/src/index.css +++ b/src/index.css @@ -232,3 +232,36 @@ body { html { scroll-behavior: smooth; } + +/* Pulse animation for status badge dot */ +@keyframes pulse { + 0%, 100% { + opacity: 1; + } + 50% { + opacity: 0.4; + } +} + +/* Custom scrollbar for sidebar */ +.pmr-scrollbar { + scrollbar-width: thin; + scrollbar-color: var(--border) transparent; +} + +.pmr-scrollbar::-webkit-scrollbar { + width: 4px; +} + +.pmr-scrollbar::-webkit-scrollbar-track { + background: transparent; +} + +.pmr-scrollbar::-webkit-scrollbar-thumb { + background: var(--border); + border-radius: 2px; +} + +.pmr-scrollbar::-webkit-scrollbar-thumb:hover { + background: var(--text-tertiary); +}