import type { ReactNode } from "react";

type Props = {
  title: string;
  actions?: ReactNode;
  children: ReactNode;
};

export default function DetailSection({ title, actions, children }: Props) {
  return (
    <section className="rounded-lg border bg-white p-6">
      <div className="mb-5 flex items-center justify-between gap-4">
        <h2 className="text-lg font-semibold text-slate-950">{title}</h2>
        {actions}
      </div>
      {children}
    </section>
  );
}
