import React from 'react'; import { CodeBlock } from './CodeBlock'; import { ApiDocEntry, ApiSection } from '../types'; interface ContentPageProps { title: string; introduction?: string | React.ReactNode; sections?: ApiSection[]; children?: React.ReactNode; } export const ContentPage: React.FC = ({ title, introduction, sections, children }) => { return (

{title}

{introduction && (
{typeof introduction === 'string' ?

{introduction}

: introduction}
)} {children} {/* Render children (like InfoPanel) before sections if they are direct children of ContentPage */} {sections && sections.map((section, idx) => (

{section.title}

{section.description &&

{section.description}

} {section.entries.map((entry, entryIdx) => (

{entry.signature}

{typeof entry.description === 'string' ?

{entry.description}

: entry.description}
{entry.parameters && entry.parameters.length > 0 && (

Parameters:

    {entry.parameters.map((param, pIdx) => (
  • {param.name}: {param.type} - {param.description}
  • ))}
)} {entry.returns && (

Returns:

{entry.returns.type} - {entry.returns.description}

)} {entry.example && (

Example:

)} {/* Old notes rendering removed, as InfoPanel is now used directly within page content */}
))}
))}
); };