This repository has no description
1<script module lang="ts">
2 import { defineMeta } from "@storybook/addon-svelte-csf";
3 import FileTree from "./FileTree.svelte";
4
5 const entries = [
6 {
7 name: "src",
8 kind: "directory" as const,
9 size: 0,
10 lastCommitHash: "0123456789abcdef",
11 lastCommitWhen: "2026-07-28T09:00:00Z",
12 lastCommitMessage: "refactor: move the components"
13 },
14 {
15 name: "README.md",
16 kind: "file" as const,
17 size: 512,
18 lastCommitHash: "abcdef0123456789",
19 lastCommitWhen: "2026-07-27T09:00:00Z",
20 lastCommitMessage: "docs: explain the project"
21 },
22 { name: "LICENSE", kind: "file" as const, size: 1024 },
23 { name: "docs", kind: "directory" as const, size: 0 },
24 { name: "linked-lib", kind: "symlink" as const, size: 0 },
25 { name: "dependency", kind: "submodule" as const, size: 0 }
26 ];
27
28 const { Story } = defineMeta({
29 title: "Repo/FileTree",
30 component: FileTree,
31 tags: ["autodocs"],
32 args: {
33 ownerHandle: "dawn",
34 repoName: "tangled",
35 ref: "main",
36 entries
37 }
38 });
39</script>
40
41<Story name="File kinds and timestamps" />
42<Story name="Commit message column" args={{ withMessage: true }} />
43<Story name="Nested path links" args={{ path: "src/lib" }} />
44<Story name="No entries" args={{ entries: [] }} />