Add story for expandable diffs

This commit is contained in:
René Pfeuffer
2020-06-10 13:32:06 +02:00
parent 4e69d03678
commit fc72cb8d5f
2 changed files with 4314 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -114,4 +114,11 @@ storiesOf("Diff", module)
})
.add("CollapsingWithFunction", () => (
<Diff diff={diffFiles} defaultCollapse={(oldPath, newPath) => oldPath.endsWith(".java")} />
));
))
.add("Expandable", () => {
const filesWithLanguage = diffFiles.map((file: File) => {
file._links = { lines: { href: "http://example.com/" } };
return file;
});
return <Diff diff={filesWithLanguage} />;
});