fix(labs): shared primitives in lab views, drop value Learn link

Replace the hand-rolled native scan dropzone button with the shared
Button primitive, swap the inline-style chart height for a height
class, and remove the Learn link from the biomarker value view where it
does not belong.
This commit is contained in:
Marc-André Bombeck committed 2026-06-27 12:49:00 +02:00
1 parent 3ad59cde98
commit 0bde6545b6
3 files changed
+5 -8

No files matched your search

+1 -2
View File
@@ -14,7 +14,6 @@ import {
} from "recharts";
import { Button } from "@/components/ui/button";
import { CHART_HEIGHT_PX } from "@/lib/charts/constants";
import { prefersReducedMotion } from "@/lib/charts/reduced-motion";
import { formatDateShort } from "@/lib/format";
import { formatLabValue } from "@/lib/labs/format-value";
@@ -128,7 +127,7 @@ export function LabBiomarkerChart({
{t("labs.chart.empty")}
</p>
) : (
<div style={{ height: CHART_HEIGHT_PX }}>
<div className="h-[240px]">
<ResponsiveContainer width="100%" height="100%">
<ComposedChart
data={points}
@@ -11,7 +11,6 @@ import { Button } from "@/components/ui/button";
import { Card, CardContent } from "@/components/ui/card";
import { EmptyState } from "@/components/ui/empty-state";
import { ResponsiveSheet } from "@/components/ui/responsive-sheet";
import { LearnMoreLink } from "@/components/ui/learn-more-link";
import { Skeleton } from "@/components/ui/skeleton";
import { apiDelete, apiGet } from "@/lib/api/api-fetch";
import { classifyReferenceRange } from "@/lib/labs/reference-range";
@@ -228,8 +227,6 @@ export function LabBiomarkerDetail({ biomarkerId }: { biomarkerId: string }) {
<p className="text-muted-foreground text-sm">{marker.context}</p>
) : null}
<LearnMoreLink concept="LAB_BIOMARKER" />
<Card>
<CardContent className="pt-6">
{isLoading ? (
+4 -3
View File
@@ -220,11 +220,12 @@ export function OcrReviewDialog({
if (file) onFilePicked(file);
}}
/>
<button
<Button
type="button"
variant="outline"
onClick={() => inputRef.current?.click()}
disabled={extract.isPending}
className="border-muted-foreground/25 hover:bg-muted/50 focus-visible:ring-ring flex min-h-44 w-full flex-col items-center justify-center gap-3 rounded-lg border border-dashed p-6 text-center transition-colors focus-visible:ring-2 focus-visible:outline-none disabled:opacity-60"
className="border-muted-foreground/25 hover:bg-muted/50 h-auto min-h-44 w-full flex-col gap-3 rounded-lg border-dashed p-6 text-center whitespace-normal"
>
{extract.isPending ? (
<>
@@ -261,7 +262,7 @@ export function OcrReviewDialog({
) : null}
</>
)}
</button>
</Button>
</div>
) : (
<div className="space-y-3 py-2">