import classNames from 'classnames'; import React, { PropsWithChildren } from 'react'; import SectionTitle from '@/Components/SectionTitle'; interface Props { title: string; description: string; renderActions?(): JSX.Element; onSubmit(): void; } export default function FormSection({ onSubmit, renderActions, title, description, children, }: PropsWithChildren) { const hasActions = !!renderActions; return (
{ e.preventDefault(); onSubmit(); }} >
{children}
{hasActions && (
{renderActions?.()}
)}
); }