Enterprise-CMCS/macpro-mako

View on GitHub
react-app/src/components/DetailsSection/index.tsx

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
import { SectionCard } from "../Cards";

interface DetailsSectionProps {
  children: React.ReactNode;
  title: React.ReactNode;
  id: string;
  description?: string;
}

export const DetailsSection = ({ children, title, description, id }: DetailsSectionProps) => {
  return (
    <SectionCard id={id} title={title}>
      {description && <p className="text-sm">{description}</p>}
      {children}
    </SectionCard>
  );
};