Add option to use a function for default collapse state

This commit is contained in:
Rene Pfeuffer
2020-02-07 14:27:21 +01:00
parent c84bba8ead
commit 22943eac9a
7 changed files with 1968 additions and 15 deletions

View File

@@ -70,4 +70,7 @@ storiesOf("Diff", module)
return file;
});
return <Diff diff={filesWithLanguage} />;
});
})
.add("CollapsingWithFunction", () => (
<Diff diff={diffFiles} defaultCollapse={(oldPath, newPath) => oldPath.endsWith(".java")} />
));