fix: show hand cursor on all buttons#1993
Conversation
Added cursor pointer to Button so all buttons show hand on hover. Improves click feedback everywhere.
WalkthroughAdded the CSS class cursor-pointer to the base buttonVariants in apps/mail/components/ui/button.tsx. No changes to variants, sizes, or public API. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Suggested labels
Suggested reviewers
Poem
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
apps/mail/components/ui/button.tsx (1)
49-53: Bug:classNameis being passed intobuttonVariantsinstead of merged
buttonVariantsonly understands declared variants (variant, size). PassingclassNameinside the options object is ignored (or type-errored in strict mode). Merge it withcninstead.Apply this diff:
- className={cn(buttonVariants({ variant, size, className }))} + className={cn(buttonVariants({ variant, size }), className)}
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
apps/mail/components/ui/button.tsx(1 hunks)
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{css,js,ts,jsx,tsx,mdx}
📄 CodeRabbit Inference Engine (.cursor/rules/tailwind-css-v4.mdc)
**/*.{css,js,ts,jsx,tsx,mdx}: Chain variants together for composable variants (e.g.,group-has-data-potato:opacity-100).
Use new variants such asstarting,not-*,inert,nth-*,in-*,open(for:popover-open), and**for all descendants.
Do not use deprecated utilities likebg-opacity-*,text-opacity-*,border-opacity-*, anddivide-opacity-*; use the new syntax (e.g.,bg-black/50).
Use renamed utilities:shadow-smis nowshadow-xs,shadowis nowshadow-sm,drop-shadow-smis nowdrop-shadow-xs,drop-shadowis nowdrop-shadow-sm,blur-smis nowblur-xs,bluris nowblur-sm,rounded-smis nowrounded-xs,roundedis nowrounded-sm,outline-noneis nowoutline-hidden.
Usebg-(--brand-color)syntax for CSS variables in arbitrary values instead ofbg-[--brand-color].
Stacked variants now apply left-to-right instead of right-to-left.
Files:
apps/mail/components/ui/button.tsx
**/*.{js,jsx,ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
**/*.{js,jsx,ts,tsx}: Use 2-space indentation
Use single quotes
Limit lines to 100 characters
Semicolons are required
Files:
apps/mail/components/ui/button.tsx
**/*.{js,jsx,ts,tsx,css}
📄 CodeRabbit Inference Engine (AGENT.md)
Use Prettier with sort-imports and Tailwind plugins
Files:
apps/mail/components/ui/button.tsx
**/*.{ts,tsx}
📄 CodeRabbit Inference Engine (AGENT.md)
Enable TypeScript strict mode
Files:
apps/mail/components/ui/button.tsx
🔇 Additional comments (1)
apps/mail/components/ui/button.tsx (1)
19-21: Dropdown item variant still forcescursor-default— undermines “all buttons” objectiveThis variant sets
cursor-default, which will override the new basecursor-pointergiven CVA merges base then variants. Net effect: dropdownItem buttons won’t show a hand cursor.
- If the intent is truly “all buttons show pointer,” replace
cursor-defaultwithcursor-pointerhere.- If dropdown items should remain non-pointer, adjust the PR description to clarify the exception.
Want me to update the variant and validate hover behavior across menus?
Added cursor-pointer to the base Button component so all buttons show a hand on hover. Improves click feedback everywhere.
Summary by cubic
Added cursor-pointer to the base Button component so all buttons show a hand cursor on hover, improving click feedback across the app.
Summary by CodeRabbit