mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-10 23:45:44 +01:00
Add option to use a function for default collapse state
This commit is contained in:
@@ -70,4 +70,7 @@ storiesOf("Diff", module)
|
||||
return file;
|
||||
});
|
||||
return <Diff diff={filesWithLanguage} />;
|
||||
});
|
||||
})
|
||||
.add("CollapsingWithFunction", () => (
|
||||
<Diff diff={diffFiles} defaultCollapse={(oldPath, newPath) => oldPath.endsWith(".java")} />
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user