This repository has no description
1<script module lang="ts">
2 import { defineMeta } from "@storybook/addon-svelte-csf";
3 import RepoToolbar from "./RepoToolbar.svelte";
4 import type { RepoInfo } from "./types";
5
6 const repo: RepoInfo = {
7 uri: "at://did:plc:repo/sh.tangled.repo.repo/3jzrepo",
8 rkey: "3jzrepo",
9 name: "tangled",
10 ownerDid: "did:plc:owner",
11 ownerHandle: "dawn",
12 repoDid: "did:plc:repo",
13 knot: "knot1.tangled.sh",
14 defaultBranch: "main"
15 };
16
17 const { Story } = defineMeta({
18 title: "Repo/RepoToolbar",
19 component: RepoToolbar,
20 tags: ["autodocs"],
21 args: {
22 repo,
23 ref: "main",
24 refs: { branches: ["main", "feature/storybook"], tags: ["v1.0.0"] },
25 totalCommits: 42,
26 totalBranches: 2,
27 totalTags: 1,
28 bobbinUrl: "https://bobbin.example.test"
29 }
30 });
31</script>
32
33<Story name="Branch and tag refs" />
34<Story name="Detached commit ref" args={{ ref: "0123456789abcdef", totalCommits: 1 }} />
35<Story
36 name="Repository has no tags"
37 args={{ refs: { branches: ["main"], tags: [] }, totalTags: 0 }}
38/>