From 02fe431aa8058a2dce3553566464bbc7a1639281 Mon Sep 17 00:00:00 2001 From: abaicus Date: Wed, 29 Jan 2025 20:42:21 +0200 Subject: [PATCH] chore: allow ids on the card component --- .../dashboard/src/Components/Content/ModuleGrid.js | 2 +- assets/apps/dashboard/src/Layout/Card.js | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/assets/apps/dashboard/src/Components/Content/ModuleGrid.js b/assets/apps/dashboard/src/Components/Content/ModuleGrid.js index b71efba083..38afe61388 100644 --- a/assets/apps/dashboard/src/Components/Content/ModuleGrid.js +++ b/assets/apps/dashboard/src/Components/Content/ModuleGrid.js @@ -103,7 +103,7 @@ const ModuleCard = ({ moduleData, slug }) => { title={nicename} className="bg-white p-6 rounded-lg shadow-sm" afterTitle={} - data-module={slug} + id={`module-${slug}`} >

{description}{' '} diff --git a/assets/apps/dashboard/src/Layout/Card.js b/assets/apps/dashboard/src/Layout/Card.js index 0f9149efe3..d00980209e 100644 --- a/assets/apps/dashboard/src/Layout/Card.js +++ b/assets/apps/dashboard/src/Layout/Card.js @@ -1,6 +1,13 @@ import cn from 'classnames'; -export default ({ icon, title, children, afterTitle, className = '' }) => { +export default ({ + icon, + title, + children, + afterTitle, + className = '', + id = null, +}) => { const classes = cn( [ 'p-6 rounded-lg shadow-sm', @@ -12,7 +19,7 @@ export default ({ icon, title, children, afterTitle, className = '' }) => { ); return ( -

+
{(icon || title) && (
{icon && (