mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-14 09:25:43 +01:00
Add story for expandable diffs
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -114,4 +114,11 @@ storiesOf("Diff", module)
|
|||||||
})
|
})
|
||||||
.add("CollapsingWithFunction", () => (
|
.add("CollapsingWithFunction", () => (
|
||||||
<Diff diff={diffFiles} defaultCollapse={(oldPath, newPath) => oldPath.endsWith(".java")} />
|
<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} />;
|
||||||
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user