/*
* Copyright (c) 2020 - present Cloudogu GmbH
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU Affero General Public License as published by the Free
* Software Foundation, version 3.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
* details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see https://www.gnu.org/licenses/.
*/
// import { storiesOf } from "@storybook/react";
// import * as React from "react";
// import styled from "styled-components";
// import Breadcrumb from "./Breadcrumb";
// import repository from "./__resources__/repository";
// // @ts-ignore ignore unknown png
// import Git from "./__resources__/git-logo.png";
// import { MemoryRouter } from "react-router-dom";
// import Icon from "./Icon";
//
// const Wrapper = styled.div`
// margin: 2rem;
// max-width: 800px;
// `;
//
// const master = { name: "master", revision: "1", defaultBranch: true, _links: {} };
// const path = "src/main/java/com/cloudogu";
// const longPath =
// "dream-path/src/main/scm-plugins/javaUtilityHomeHousingLinkReferrer/sonia/scm/repositoryUndergroundSupportManager/spi/SvnRepositoryServiceResolver.java";
// const baseUrl = "scm-manager.org/scm/repo/hitchhiker/heartOfGold/sources";
// const sources = Git;
// const prefix = (
//
//
//
// );
//
// storiesOf("BreadCrumb", module)
// .addDecorator(story => {story()})
// .addDecorator(storyFn => {storyFn()})
// .add("Default", () => (
//
// ))
// .add("Long path", () => (
//
// ))
// .add("With prefix button", () => (
//
// ))
// .add("Not clickable", () => (
//
// ));
import React from "react";
import styled from "styled-components";
import { MemoryRouter } from "react-router-dom";
import type { Meta, StoryObj } from "@storybook/react";
import Breadcrumb from "./Breadcrumb";
import Icon from "./Icon";
import repository from "./__resources__/repository";
// @ts-ignore ignore unknown png
import Git from "./__resources__/git-logo.png";
const Wrapper = styled.div`
margin: 2rem;
max-width: 800px;
`;
const master = { name: "master", revision: "1", defaultBranch: true, _links: {} };
const path = "src/main/java/com/cloudogu";
const longPath =
"dream-path/src/main/scm-plugins/javaUtilityHomeHousingLinkReferrer/sonia/scm/repositoryUndergroundSupportManager/spi/SvnRepositoryServiceResolver.java";
const baseUrl = "scm-manager.org/scm/repo/hitchhiker/heartOfGold/sources";
const sources = Git;
const prefix = (
);
const meta: Meta = {
title: "Components/Breadcrumb",
component: Breadcrumb,
decorators: [(Story) => , (Story) => {Story()}],
tags: ["autodocs"],
};
export default meta;
type Story = StoryObj;
export const Default: Story = {
args: {
repository: repository,
defaultBranch: master,
branch: master,
path: path,
baseUrl: baseUrl,
sources: sources,
revision: "1",
permalink: "/" + path,
},
};
export const LongPath: Story = {
args: {
...Default.args,
path: longPath,
permalink: "/" + longPath,
},
};
export const WithPrefixButton: Story = {
args: {
...Default.args,
preButtons: prefix,
},
};
export const NotClickable: Story = {
args: {
...Default.args,
clickable: false,
},
};