From d219c88560e24c2302e23b98dd7dd95ac75dcd99 Mon Sep 17 00:00:00 2001 From: Bianca Roberta Ianosel Date: Tue, 3 Nov 2026 10:05:37 +0000 Subject: [PATCH 1/2] fix(materials): make pending cards interactive with activation notice --- AGENTS.md | 2 +- src/components/card-caption.tsx | 16 +++++++++--- src/components/card-icon/index.tsx | 20 ++++++++++++--- src/components/card-icon/types.ts | 4 ++- src/components/home/materials.tsx | 18 +++++++++++--- src/components/ui/activation-toast.tsx | 34 ++++++++++++++++++++++++++ 6 files changed, 81 insertions(+), 13 deletions(-) create mode 100644 src/components/ui/activation-toast.tsx diff --git a/AGENTS.md b/AGENTS.md index abd1342a..96a620fd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -14,7 +14,7 @@ breaking changes with `!` or a `BREAKING CHANGE:` footer. -# This is NOT the Next.js you know +## This is NOT the Next.js you know This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in `node_modules/next/dist/docs/` (resolved from this file's directory; in monorepos the `next` package may not be visible from the repo root) before writing any code. Heed deprecation notices. diff --git a/src/components/card-caption.tsx b/src/components/card-caption.tsx index 70468f5c..62c63927 100644 --- a/src/components/card-caption.tsx +++ b/src/components/card-caption.tsx @@ -12,6 +12,7 @@ export function CardCaption({ iconPosition = "right", image, href, + onClick, footer, className, titleClassName, @@ -24,6 +25,7 @@ export function CardCaption({ /** An image shown in place of the icon, e.g. a project's logo. */ image?: string href?: string + onClick?: () => void /** Pinned to the bottom of the card, e.g. where a link leads to. */ footer?: ReactNode className?: string @@ -31,12 +33,18 @@ export function CardCaption({ captionClassName?: string }) { return ( - // Only cards that lead somewhere react to hover a:focus-visible]:ring-2 has-[>a:focus-visible]:ring-blue-secondary", className)} + hoverBackground={Boolean(href || onClick)} + className={cn( + (href || onClick) && "has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-blue-secondary", + className + )} > - {href && } + {href ? ( + + ) : onClick ? ( +