import React from "react"; import { useThemeHooks } from "@redocly/theme/core/hooks"; import { Link } from "@redocly/theme/components/Link/Link"; export interface DeveloperResourcesCard { title: string; description: string | React.ReactNode; links: Array<{ text: string; url: string; target?: "_blank" | "_self"; }>; backgroundClass?: string; } export interface DeveloperResourcesSectionProps { cards: DeveloperResourcesCard[]; className?: string; } export const DeveloperResourcesSection: React.FC = ({ cards, className = "" }) => { const { useTranslate } = useThemeHooks(); const { translate } = useTranslate(); const isSingleCard = cards.length === 1; return (
{cards.map((card, index) => (
{translate(card.title)}

{typeof card.description === 'string' ? translate(card.description) : card.description}

{card.links.map((link, linkIndex) => ( {translate(link.text)} ))}
))}
); };