import React from 'react'; import clsx from 'clsx'; import { ButtonGroup, ButtonConfig } from '../ButtonGroup'; export interface LinkTextCardProps { /** Card index for numbering (displays as index + 1) */ index: number; /** Heading text (required) */ heading: string; /** Description text (required) */ description: string; /** Array of button configurations (max 2) */ buttons: ButtonConfig[]; /** Additional CSS classes */ className?: string; } /** * LinkTextCard Component * * A card component that displays a numbered item with heading, description, and action buttons. * Features a top divider, sequential numbering (01, 02, 03...), and up to 2 call-to-action buttons. * * Design: * - Flat HTML structure for minimal DOM depth * - Fixed green button color for brand consistency * - Responsive typography using existing design tokens * - Full light/dark mode support * * @example * // Basic usage * * * @example * // Single button * */ export const LinkTextCard: React.FC = ({ index, heading, description, buttons, className, }) => { // Format number with zero padding (01, 02, 03...) const formattedNumber = String(index + 1).padStart(2, '0'); // Ensure max 2 buttons for proper layout const maxButtons = buttons.slice(0, 2); return ( {formattedNumber} {heading} {description} {maxButtons.length > 0 && ( )} ); }; export default LinkTextCard;
{formattedNumber}
{description}