Skip to content

Commit

Permalink
Run "yarn build:docs"
Browse files Browse the repository at this point in the history
  • Loading branch information
metonym committed Nov 11, 2023
1 parent c6c7569 commit a48afb5
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 5 deletions.
7 changes: 4 additions & 3 deletions COMPONENT_INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -4707,9 +4707,10 @@ export interface TreeNode {

### Slots

| Slot name | Default | Props | Fallback |
| :-------- | :------ | :---- | :----------------------- |
| labelText | No | -- | <code>{labelText}</code> |
| Slot name | Default | Props | Fallback |
| :-------- | :------ | :-------------------------------------------------------------------------------------------------------------------------------- | :----------------------- |
| -- | Yes | <code>{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } } </code> | <code>{node.text}</code> |
| labelText | No | -- | <code>{labelText}</code> |

### Events

Expand Down
6 changes: 6 additions & 0 deletions docs/src/COMPONENT_API.json
Original file line number Diff line number Diff line change
Expand Up @@ -14668,6 +14668,12 @@
],
"moduleExports": [],
"slots": [
{
"name": "__default__",
"default": true,
"fallback": "{node.text}",
"slot_props": "{ node: { id: TreeNodeId; text: string; expanded: boolean, leaf: boolean; disabled: boolean; selected: boolean; } }"
},
{
"name": "labelText",
"default": false,
Expand Down
10 changes: 9 additions & 1 deletion tests/TreeView.test.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,12 @@
on:select="{({ detail }) => console.log('select', detail)}"
on:toggle="{({ detail }) => console.log('toggle', detail)}"
on:focus="{({ detail }) => console.log('focus', detail)}"
/>
let:node
>
{node.id}
{node.disabled}
{node.expanded}
{node.leaf}
{node.selected}
{node.text}
</TreeView>
14 changes: 13 additions & 1 deletion types/TreeView/TreeView.svelte.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,19 @@ export default class TreeView extends SvelteComponentTyped<
focus: CustomEvent<TreeNode & { expanded: boolean; leaf: boolean }>;
keydown: WindowEventMap["keydown"];
},
{ labelText: {} }
{
default: {
node: {
id: TreeNodeId;
text: string;
expanded: boolean;
leaf: boolean;
disabled: boolean;
selected: boolean;
};
};
labelText: {};
}
> {
/**
* Programmatically expand all nodes
Expand Down

0 comments on commit a48afb5

Please sign in to comment.