export interface DiffTableProps { fields: { title: string; prev?: string | null; next: string | null }[]; } const DiffTable = (props: DiffTableProps) => { return (
{props.fields.map(({ title, prev, next }) => { if (prev === undefined) { prev = next; } return ( <>
{`${title}:`}
); })}
); }; export default DiffTable;