21 lines
701 B
TypeScript
21 lines
701 B
TypeScript
import type { ReactNode } from 'react';
|
|
|
|
/** Keep provenance available without making it the investor's primary content. */
|
|
export default function EvidenceDetails({
|
|
children,
|
|
title = 'Fontes e detalhes da informação',
|
|
}: {
|
|
children: ReactNode;
|
|
title?: string;
|
|
}) {
|
|
if (!children) return null;
|
|
return (
|
|
<details className="min-w-0 rounded-lg border border-slate-200 p-3 text-sm [overflow-wrap:anywhere]">
|
|
<summary className="cursor-pointer font-semibold focus-visible:outline-2 focus-visible:outline-offset-2">
|
|
{title}
|
|
</summary>
|
|
<div className="mt-3 min-w-0 space-y-3">{children}</div>
|
|
</details>
|
|
);
|
|
}
|