/** * External Dependencies */ import { ReactNode } from 'react'; /** * Internal Dependencies */ import sharedStyles from '@givewp/components/AdminDetailsPage/AdminDetailsPage.module.scss'; import ErrorBoundary from './ErrorBoundary'; /** * @since 4.4.0 */ interface AdminSectionProps { title: string; description: string; children: ReactNode; } /** * @since 4.4.0 */ interface AdminSectionFieldProps { subtitle?: string; children: ReactNode; error?: string; } /** * @since 4.4.0 */ export function AdminSectionField({ subtitle, children, error }: AdminSectionFieldProps) { return (
{subtitle &&

{subtitle}

} {children} {error &&
{error}
}
); } /** * @since 4.4.0 */ export function AdminSectionsWrapper({ children }: { children: ReactNode }) { return (
{children}
); } /** * @since 4.4.0 */ export default function AdminSection({ title, description, children }: AdminSectionProps) { return (

{title}

{description}
{children}
); }