Skip to content

Commit e513a45

Browse files
authored
fix(ui): add cursor-pointer and hover animation to Copy Link button (JhaSourav07#978)
## Description Fixes JhaSourav07#969 The `Copy Link` button on the Contribution Story page lacked hover animations and cursor feedback, making it feel non-interactive. This fix adds proper hover and active state styling to the button. **Changes made:** - Added `cursor-pointer` so the cursor changes to a pointer on hover - Added `transform` and `hover:scale-105` for a subtle scale-up effect on hover - Added `hover:brightness-125` for visible brightness feedback on hover - Added `hover:border-white/30` for a border highlight on hover - Added `active:scale-95` for a click/press feedback effect - Fixed in both `components/dashboard/ShareSheet.tsx` and `app/page.tsx` - Separated the Copy Link button into its own explicit JSX branch so Tailwind JIT compiler can detect all utility classes correctly --- ## Pillar - [ ] 🎨 Pillar 1 — New Theme Design - [ ] 📐 Pillar 2 — Geometric SVG Improvement - [ ] 🕐 Pillar 3 — Timezone Logic Optimization - [x] 🛠️ Other (Bug fix, refactoring, docs) --- ## Visual Preview https://github.com/user-attachments/assets/de73b3bd-3733-4d35-9005-d04c7c3498ac --- ## Checklist before requesting a review: - [x] I have read the `CONTRIBUTING.md` file. - [x] I have tested these changes locally (`localhost:3000/api/streak?user=Pranav-IIITM`). - [x] I have run `npm run format` and `npm run lint` locally and resolved all errors (CI will fail otherwise). - [x] My commits follow the Conventional Commits format (e.g., `feat(themes): ...`, `fix(calculate): ...`). - [ ] I have updated `README.md` if I added a new theme or URL parameter. - [x] I have started the repo. - [x] I have made sure that i have only one commit to merge in this PR. - [ ] The SVG output matches the CommitPulse "premium quality" aesthetic standard (no raw elements, smooth animations, correct fonts). - [x] (Recommended) I joined the CommitPulse Discord community for contributor discussions, mentorship, and faster PR support.
2 parents e40af0f + de32f80 commit e513a45

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

app/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ export default function LandingPage() {
238238
<button
239239
type="submit"
240240
disabled={!mounted || !hasUsername}
241-
className={`relative flex min-w-[160px] items-center justify-center gap-2 overflow-hidden rounded-xl px-6 py-3.5 text-sm font-semibold transition-all duration-200 active:scale-[0.98] ${
241+
className={`relative flex min-w-[160px] items-center justify-center gap-2 overflow-hidden rounded-xl px-6 py-3.5 text-sm font-semibold transition-all duration-200 transform cursor-pointer hover:scale-105 hover:brightness-125 active:scale-[0.98] disabled:cursor-not-allowed ${
242242
hasUsername
243243
? 'bg-black text-white hover:bg-zinc-800 dark:bg-white dark:text-black dark:hover:bg-zinc-100'
244244
: 'bg-gray-200 text-gray-500 dark:bg-white/10 dark:text-white/35'

0 commit comments

Comments
 (0)