mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-19 08:12:52 +00:00
feat(ui): InlineAction for small text actions, with a 44 px touch floor
Thirty-three hand-rolled underlined text links and buttons (Open schedule, Select all, View all, Retry, Learn more, the device-code copy action, ...) carried three different focus rings, none on half of them, and a 16 px target on a phone. They now render through one InlineAction primitive: tone primary / muted / foreground, size xs / sm, a focus ring, and min-h-11 on a coarse pointer so the desktop layout does not move. A structural test refuses a new hand-rolled copy.
This commit is contained in:
1 parent
ce8074ad08
commit
60be63bcd1
33 files changed
+484
-222
No files matched your search
@@ -54,6 +54,7 @@ import { useTranslations } from "@/lib/i18n/context";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
import { formatPeriod, type PeriodQuery } from "./period-query";
|
||||
import { InlineAction } from "@/components/ui/inline-action";
|
||||
|
||||
export interface EntityLinkOption {
|
||||
id: string;
|
||||
@@ -546,16 +547,15 @@ export function EntityLinkPicker({
|
||||
>
|
||||
{group.label}
|
||||
</span>
|
||||
<button
|
||||
type="button"
|
||||
<InlineAction
|
||||
tone="muted"
|
||||
data-slot={`${slot}-group-select`}
|
||||
onClick={() =>
|
||||
change(toggleAll(selected, groupIds), group.options)
|
||||
}
|
||||
className="text-muted-foreground hover:text-foreground text-xs underline-offset-2 hover:underline"
|
||||
>
|
||||
{t("links.picker.selectAll")}
|
||||
</button>
|
||||
</InlineAction>
|
||||
</div>
|
||||
) : null}
|
||||
<ul className="space-y-1">
|
||||
|
||||
Reference in new issue
Block a user