From 77882079e80ac6bb1f61a7ce5c782d7de69018ef Mon Sep 17 00:00:00 2001
From: adilallo <39313955+adilallo@users.noreply.github.com>
Date: Wed, 27 Aug 2025 09:23:54 -0600
Subject: [PATCH] Add interactivity and accessibility
---
app/components/FeatureGrid.js | 14 +++++++-
app/components/MiniCard.js | 64 +++++++++++++++++++++++++++++++++--
2 files changed, 74 insertions(+), 4 deletions(-)
diff --git a/app/components/FeatureGrid.js b/app/components/FeatureGrid.js
index f6e19c1..8d29827 100644
--- a/app/components/FeatureGrid.js
+++ b/app/components/FeatureGrid.js
@@ -25,30 +25,42 @@ const FeatureGrid = ({ title, subtitle, className = "" }) => {
{/* MiniCard Grid */}
-
diff --git a/app/components/MiniCard.js b/app/components/MiniCard.js
index 1df1040..9b5abf5 100644
--- a/app/components/MiniCard.js
+++ b/app/components/MiniCard.js
@@ -10,19 +10,27 @@ const MiniCard = ({
label,
labelLine1,
labelLine2,
+ onClick,
+ href,
+ ariaLabel,
}) => {
- return (
+ const cardContent = (
{/* Top part - Inner panel */}
{/* Content for the inner panel */}
{panelContent && (
@@ -44,6 +52,56 @@ const MiniCard = ({
);
+
+ // If href is provided, render as a link
+ if (href) {
+ return (
+
+ {cardContent}
+
+ );
+ }
+
+ // If onClick is provided, render as a button
+ if (onClick) {
+ return (
+ {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ onClick();
+ }
+ }}
+ >
+ {cardContent}
+
+ );
+ }
+
+ // Default render as a div
+ return (
+
+ {cardContent}
+
+ );
};
export default MiniCard;