From 97e1e3bc50df0b7faa9f193fe306a4d08b975bd2 Mon Sep 17 00:00:00 2001 From: Mike Hartington Date: Wed, 8 Jan 2025 08:03:31 -0500 Subject: [PATCH] fix(nx-dev): fix heroicons for safari (#29544) --- nx-dev/ui-markdoc/src/lib/tags/cards.component.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nx-dev/ui-markdoc/src/lib/tags/cards.component.tsx b/nx-dev/ui-markdoc/src/lib/tags/cards.component.tsx index 93be6f1ed9..3402a43619 100644 --- a/nx-dev/ui-markdoc/src/lib/tags/cards.component.tsx +++ b/nx-dev/ui-markdoc/src/lib/tags/cards.component.tsx @@ -101,9 +101,9 @@ export function Cards({ ); } -function callIfFunction(fn: any) { +function callIfFunction(fn: any, props: { [key: string]: string } = {}) { if (typeof fn === 'function') { - return fn({}); + return fn(props); } return fn; } @@ -142,7 +142,8 @@ export function LinkCard({ (frameworkIcons[icon as Framework]?.image || callIfFunction(nxDevIcons[icon as keyof typeof nxDevIcons]) || callIfFunction( - (heroIcons[icon as keyof typeof heroIcons] as any)?.render + (heroIcons[icon as keyof typeof heroIcons] as any)?.render, + { className: 'w-full h-full' } ))} )}