import React from 'react' import type { FDUspTableBlock as FDUspTableBlockProps } from '@/payload-types' const bgMap: Record = { white: 'bg-white', gray: 'bg-fd-gray-light', navy: 'bg-fd-navy', } const textMap: Record = { navy: 'text-fd-navy', white: 'text-white', } const borderMap: Record = { navy: 'border-fd-navy/10', white: 'border-white/20', } const checkColors: Record = { navy: { circle: '#0E2338', check: 'white' }, yellow: { circle: '#FECC02', check: '#0E2338' }, gray: { circle: '#F0F0F0', check: '#0E2338' }, } const CheckIcon: React.FC<{ color: string }> = ({ color }) => { const c = checkColors[color] || checkColors.navy return ( ) } export const FDUspTableBlockComponent: React.FC = ({ heading, rows, checkColor = 'navy', background = 'white', textColor = 'navy', }) => { const bg = bgMap[background || 'white'] const txt = textMap[textColor || 'navy'] const border = borderMap[textColor || 'navy'] return (
{heading && (

{heading}

)}
{rows?.map((row, index) => (
{row.title}

{row.description}

))}
) }