The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 24, 22:45 UTC
[fix/feat:ui] Use shared button for model favorites (#3223)
ss committed
Jun 20, 2026 at 09:40 UTC
6c5fb7930d7e14622bf07f8b79dec80b26981635
1 file changed
+6
-4
apps/web/src/components/chat/ModelListRow.tsx
+6
-4
@@ -8,6 +8,7 @@ import {
8
PROVIDER_ICON_BY_PROVIDER,
9
} from "./providerIconUtils";
10
import { ComboboxItem } from "../ui/combobox";
11
+import { Button } from "../ui/button";
12
import { Kbd } from "../ui/kbd";
13
import { Tooltip, TooltipPopup, TooltipTrigger } from "../ui/tooltip";
14
import { cn } from "~/lib/utils";
@@ -92,9 +93,11 @@ export const ModelListRow = memo(function ModelListRow(props: {
93
<Tooltip>
94
<TooltipTrigger
95
render={
95
- <button
96
+ <Button
97
+ size="icon-xs"
98
+ variant="ghost"
99
className={cn(
97
- "relative -mr-1 flex size-4 shrink-0 cursor-pointer items-center justify-center rounded-md text-muted-foreground/70 opacity-64 transition-[background-color,color,opacity] hover:bg-background/70 hover:text-foreground hover:opacity-100 group-hover:opacity-100 pointer-coarse:after:absolute pointer-coarse:after:size-full pointer-coarse:after:min-h-11 pointer-coarse:after:min-w-11",
100
+ "-mr-1 shrink-0 text-muted-foreground/70 opacity-64 transition-[color,opacity] hover:text-foreground hover:opacity-100 group-hover:opacity-100",
101
props.isFavorite && "text-foreground opacity-100",
102
)}
103
onClick={(event) => {
@@ -105,7 +108,6 @@ export const ModelListRow = memo(function ModelListRow(props: {
108
event.stopPropagation();
109
}}
110
disabled={Boolean(props.disabledReason)}
108
- type="button"
111
aria-label={props.isFavorite ? "Remove from favorites" : "Add to favorites"}
112
>
113
<StarIcon
@@ -114,7 +116,7 @@ export const ModelListRow = memo(function ModelListRow(props: {
116
props.isFavorite && "fill-current text-yellow-500",
117
)}
118
/>
117
- </button>
119
+ </Button>
120
}
121
/>
122
<TooltipPopup side="top" align="center">