'use client' import * as React from 'react' import { cn } from '../../utils/cn' import { Button } from '../ui/button' export interface MingoOnboardingCardAction { /** Stable React key. */ id: string /** Button label (e.g. "Recent", "Search", "Find"). Rendered as-is. */ label: React.ReactNode /** Click handler — receives the original mouse event so callers that * also have a card-level `onClick` can `stopPropagation`. */ onClick: (event: React.MouseEvent) => void } export interface MingoOnboardingCardProps { /** Leading 16×16 icon rendered to the left of the title row. */ icon?: React.ReactNode /** Card title (DM Sans Medium 14px, white). Truncates on overflow. */ title: React.ReactNode /** Slash-command label rendered right-aligned in the title row (e.g. `/roadmap`). */ slashCommand?: React.ReactNode /** Optional description rendered below the title row. */ description?: React.ReactNode /** Optional row of small outline action buttons rendered below the * description (e.g. `Recent`, `Search`, `Find`). When supplied, the * card itself stays a non-interactive `
` — each action button * owns its own click contract. */ actions?: ReadonlyArray /** Optional click handler — when set AND `actions` is empty/undefined, * the card renders as a ` ))}
) : null} ) const baseClass = cn( 'flex w-full items-start p-[var(--spacing-system-s)] bg-ods-card border-b border-ods-border last:border-b-0 text-left', isInteractive && 'transition-colors hover:bg-ods-bg-hover focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ods-accent cursor-pointer', className, ) if (isInteractive) { return ( ) } return
{body}
}