14 lines
422 B
TypeScript
14 lines
422 B
TypeScript
import type { DiffHunk } from '../../features/documentRevision/types';
|
|
|
|
export function DiffNavigator(props: { hunks: DiffHunk[] }) {
|
|
return (
|
|
<nav aria-label="差异导航" style={{ display: 'flex', flexWrap: 'wrap', gap: 4, marginBottom: 8 }}>
|
|
{props.hunks.map((h) => (
|
|
<a key={h.id} href={`#hunk-${h.id}`} style={{ fontSize: 12 }}>
|
|
{h.kind}:{h.id}
|
|
</a>
|
|
))}
|
|
</nav>
|
|
);
|
|
}
|