refactor(healthpost): move SymptomTallyDashboard inline styles to CSS module tokens

The waterborne-outbreak info box (background #eff6ff, border #bfdbfe) and
its two <p> elements used static inline style={{...}} instead of the
project's CSS-Modules + design-token convention.

- Added .waterborneInterop / .waterborneInteropMessage /
  .waterborneInteropStatus classes to SymptomTallyDashboard.module.css,
  token-referenced via --space-3/--space-2/--radius-sm/--text-body-size.
- The background's closest existing token is --color-accent-soft
  (#e8f2ff); no existing token matched the border color, so added
  --color-accent-border: #bfdbfe to tokens.css following the existing
  --color-warning-border naming precedent.
- Verified: vitest (5/5 green), tsc -b && vite build clean, oxlint clean
  (0 warnings in touched files), before/after Playwright screenshots of
  the live /miniapp/health-post view render identically.
This commit is contained in:
OmO Orchestrator committed 2026-11-20 20:02:19 -05:00
1 parent 913b4e03da
commit 020b71149d
3 files changed
+22 -6

No files matched your search

@@ -98,6 +98,24 @@
font-variant-numeric: tabular-nums;
}
.waterborneInterop {
margin-top: var(--space-3);
padding: var(--space-3);
border-radius: var(--radius-sm);
background: var(--color-accent-soft);
border: 1px solid var(--color-accent-border);
}
.waterborneInteropMessage {
margin: 0 0 var(--space-2);
font-size: var(--text-body-size);
}
.waterborneInteropStatus {
margin: var(--space-2) 0 0;
font-size: var(--text-body-size);
}
.reportForm {
display: flex;
flex-direction: column;
@@ -125,11 +125,8 @@ export function SymptomTallyDashboard() {
</ul>
{distinctDiarrheaReporters >= MIN_DISTINCT_DIARRHEA_REPORTERS && (
<div
data-testid="healthpost-waterborne-interop"
style={{ marginTop: 12, padding: 12, borderRadius: 10, background: "#eff6ff", border: "1px solid #bfdbfe" }}
>
<p style={{ margin: "0 0 8px", fontSize: 13 }}>
<div className={styles.waterborneInterop} data-testid="healthpost-waterborne-interop">
<p className={styles.waterborneInteropMessage}>
{distinctDiarrheaReporters} different residents have independently reported diarrhea -
a corroborated waterborne-outbreak signal. Raising the Fair Share water floor
guarantees every resident enough water for oral rehydration.
@@ -146,9 +143,9 @@ export function SymptomTallyDashboard() {
</button>
{floorStatus && (
<p
className={styles.waterborneInteropStatus}
data-testid="healthpost-water-floor-status"
role="status"
style={{ fontSize: 13, margin: "8px 0 0" }}
>
{floorStatus}
</p>
+1
View File
@@ -17,6 +17,7 @@
--color-accent: #0067f8;
--color-accent-strong: #0e5fd9;
--color-accent-soft: #e8f2ff;
--color-accent-border: #bfdbfe;
/* ---- Neutrals / text ---- */
--color-ink: #1f2430;