Skip to content

Commit 9030916

Browse files
refactor: add cursor-pointer to button base and refine prompt suggestion styles
Move cursor-pointer into the shared button variant so all buttons get it by default. Switch prompt suggestions to ghost variant with hover:bg-secondary for a subtler visual treatment. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 6faa163 commit 9030916

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

components/ui/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { cva, type VariantProps } from "class-variance-authority"
66
import { cn } from "@/lib/utils"
77

88
const buttonVariants = cva(
9-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
9+
"inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm font-medium disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
1010
{
1111
variants: {
1212
variant: {

components/ui/prompt-suggestion.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ function PromptSuggestion({
3939
if (!content) {
4040
return (
4141
<Button
42-
variant={variant || "secondary"}
42+
variant={variant || "ghost"}
4343
size={size || "sm"}
4444
className={cn(
45-
"w-full cursor-pointer justify-start rounded-xl py-2",
46-
"hover:bg-accent",
45+
"w-full justify-start rounded-xl py-2",
46+
"hover:bg-secondary",
4747
className
4848
)}
4949
{...props}
@@ -60,11 +60,11 @@ function PromptSuggestion({
6060

6161
return (
6262
<Button
63-
variant={variant || "secondary"}
63+
variant={variant || "ghost"}
6464
size={size || "sm"}
6565
className={cn(
66-
"w-full cursor-pointer justify-start gap-0 rounded-xl py-2",
67-
"hover:bg-accent",
66+
"w-full justify-start gap-0 rounded-xl py-2",
67+
"hover:bg-secondary",
6868
className
6969
)}
7070
{...props}

0 commit comments

Comments
 (0)