fix(dashboard): make Explore page course cards fully clickable to open the preview modal (#899)
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
iconClass?: string;
|
||||
};
|
||||
class?: string;
|
||||
/** Click handler for the card wrapper (e.g. opening a preview modal when `href` is absent) */
|
||||
onclick?: (event: MouseEvent) => void;
|
||||
/** Custom banner area (e.g. optimized `Image`); overrides `bannerImage` */
|
||||
media?: Snippet;
|
||||
/** Optional overlay inside the link (e.g. dropdown), typically absolutely positioned */
|
||||
@@ -42,6 +44,7 @@
|
||||
typeBadge,
|
||||
visibilityBadge,
|
||||
class: className = '',
|
||||
onclick,
|
||||
media,
|
||||
overlay,
|
||||
tags,
|
||||
@@ -51,7 +54,7 @@
|
||||
const resolvedBannerImage = $derived(bannerImage?.trim() ? bannerImage : DEFAULT_COURSE_BANNER_IMAGE);
|
||||
</script>
|
||||
|
||||
<Item.Root variant="outline" class={cn('ui:group ui:relative ui:max-w-[320px] ui:p-3!', className)}>
|
||||
<Item.Root variant="outline" class={cn('ui:group ui:relative ui:max-w-[320px] ui:p-3!', className)} {onclick}>
|
||||
{#snippet child({ props })}
|
||||
{#if href}
|
||||
<a {href} {...props} class={cn('ui:block', props.class as string)}>
|
||||
|
||||
@@ -12,4 +12,3 @@ export * from './compliance';
|
||||
export * from './public-course';
|
||||
export * from './section';
|
||||
export * from './invite';
|
||||
export { ZCourseGetParam, type TCourseGetParam } from './course';
|
||||
|
||||
Reference in New Issue
Block a user