Skip to content

Commit 308cc2d

Browse files
committed
update readme
1 parent c4b1d19 commit 308cc2d

File tree

1 file changed

+0
-52
lines changed

1 file changed

+0
-52
lines changed

packages/svelte-file-tree/README.md

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -7,55 +7,3 @@ Unstyled file tree component library for Svelte.
77
```bash
88
npm install svelte-file-tree
99
```
10-
11-
## Usage
12-
13-
```svelte
14-
<script lang="ts">
15-
import { FileTree, Tree, TreeItem, TreeItemInput } from "svelte-file-tree";
16-
17-
const tree = new FileTree();
18-
tree.nodes = [
19-
tree.createFolder({
20-
id: "1",
21-
name: "Section 1",
22-
children: [
23-
tree.createFile({
24-
id: "1.1",
25-
name: "Section 1.1",
26-
}),
27-
tree.createFile({
28-
id: "1.2",
29-
name: "Section 1.2",
30-
}),
31-
],
32-
}),
33-
tree.createFolder({
34-
id: "2",
35-
name: "Section 2",
36-
children: [
37-
tree.createFile({
38-
id: "2.1",
39-
name: "Section 2.1",
40-
}),
41-
tree.createFile({
42-
id: "2.2",
43-
name: "Section 2.2",
44-
}),
45-
],
46-
}),
47-
];
48-
</script>
49-
50-
<Tree {tree}>
51-
{#snippet item({ node, editing })}
52-
<TreeItem editable draggable>
53-
{#if editing}
54-
<TreeItemInput />
55-
{:else}
56-
<span>{node.name}</span>
57-
{/if}
58-
</TreeItem>
59-
{/snippet}
60-
</Tree>
61-
```

0 commit comments

Comments
 (0)