mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-11 16:05:44 +01:00
Add property to make breadcrumb not clickable (#1907)
Make breadcrumb not clickable with new property. This is useful to show the breadcrumb for path that does not exist yet. Co-authored-by: René Pfeuffer <rene.pfeuffer@cloudogu.com>
This commit is contained in:
@@ -49,8 +49,8 @@ const prefix = (
|
||||
);
|
||||
|
||||
storiesOf("BreadCrumb", module)
|
||||
.addDecorator((story) => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
||||
.addDecorator((storyFn) => <Wrapper>{storyFn()}</Wrapper>)
|
||||
.addDecorator(story => <MemoryRouter initialEntries={["/"]}>{story()}</MemoryRouter>)
|
||||
.addDecorator(storyFn => <Wrapper>{storyFn()}</Wrapper>)
|
||||
.add("Default", () => (
|
||||
<Breadcrumb
|
||||
repository={repository}
|
||||
@@ -87,4 +87,17 @@ storiesOf("BreadCrumb", module)
|
||||
permalink={"/" + path}
|
||||
preButtons={prefix}
|
||||
/>
|
||||
))
|
||||
.add("Not clickable", () => (
|
||||
<Breadcrumb
|
||||
repository={repository}
|
||||
defaultBranch={master}
|
||||
branch={master}
|
||||
path={path}
|
||||
baseUrl={baseUrl}
|
||||
sources={sources}
|
||||
revision={"1"}
|
||||
permalink={"/" + path}
|
||||
clickable={false}
|
||||
/>
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user