From d080576c8a8b2c62c85469523a55769847082dd1 Mon Sep 17 00:00:00 2001 From: metonym Date: Fri, 15 Oct 2021 16:34:01 -0700 Subject: [PATCH] chore: update TreeView, HeaderAction icon types --- COMPONENT_INDEX.md | 11 ++--------- docs/src/COMPONENT_API.json | 6 +++--- src/TreeView/TreeView.svelte | 2 +- src/UIShell/GlobalHeader/HeaderAction.svelte | 2 +- types/TreeView/TreeView.d.ts | 2 +- types/UIShell/GlobalHeader/HeaderAction.d.ts | 2 +- 6 files changed, 9 insertions(+), 16 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index 55f13c2b..068b9ebd 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1608,19 +1608,12 @@ export interface HeaderActionSlideTransition { ### Props -| Prop name | Kind | Reactive | Type | Default value | Description | -| :--------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | -| ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element | -| isOpen | let | Yes | boolean | false | Set to `true` to open the panel | -| icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | -| closeIcon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the close icon from `carbon-icons-svelte` to render | -| text | let | No | string | -- | Specify the text
Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) | -| transition | let | No | false | HeaderActionSlideTransition | { duration: 200 } | Customize the panel transition (i.e., `transition:slide`)
Set to `false` to disable the transition | | Prop name | Kind | Reactive | Type | Default value | Description | | :--------- | :--------------- | :------- | :---------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- | | ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element | | isOpen | let | Yes | boolean | false | Set to `true` to open the panel | | icon | let | No | typeof import("svelte").SvelteComponent | -- | Specify the icon from `carbon-icons-svelte` to render | +| closeIcon | let | No | typeof import("svelte").SvelteComponent | -- | Specify the close icon from `carbon-icons-svelte` to render | | text | let | No | string | -- | Specify the text
Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) | | transition | let | No | false | HeaderActionSlideTransition | { duration: 200 } | Customize the panel transition (i.e., `transition:slide`)
Set to `false` to disable the transition | @@ -4753,7 +4746,7 @@ export type TreeNodeId = string | number; export interface TreeNode { id: TreeNodeId; text: string; - icon?: typeof import("carbon-icons-svelte").CarbonIcon; + icon?: typeof import("svelte").SvelteComponent; disabled?: boolean; expanded?: boolean; } diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 4593ecf5..e201e2ae 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -4383,7 +4383,7 @@ "name": "closeIcon", "kind": "let", "description": "Specify the close icon from `carbon-icons-svelte` to render", - "type": "typeof import(\"carbon-icons-svelte\").CarbonIcon", + "type": "typeof import(\"svelte\").SvelteComponent", "isFunction": false, "isFunctionDeclaration": false, "constant": false, @@ -13252,9 +13252,9 @@ "ts": "type TreeNodeId = string | number" }, { - "type": "{ id: TreeNodeId; text: string; icon?: typeof import(\"carbon-icons-svelte\").CarbonIcon; disabled?: boolean; expanded?: boolean; }", + "type": "{ id: TreeNodeId; text: string; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; expanded?: boolean; }", "name": "TreeNode", - "ts": "interface TreeNode { id: TreeNodeId; text: string; icon?: typeof import(\"carbon-icons-svelte\").CarbonIcon; disabled?: boolean; expanded?: boolean; }" + "ts": "interface TreeNode { id: TreeNodeId; text: string; icon?: typeof import(\"svelte\").SvelteComponent; disabled?: boolean; expanded?: boolean; }" } ], "rest_props": { "type": "Element", "name": "ul" } diff --git a/src/TreeView/TreeView.svelte b/src/TreeView/TreeView.svelte index 7e36da2e..f1620ae7 100644 --- a/src/TreeView/TreeView.svelte +++ b/src/TreeView/TreeView.svelte @@ -1,7 +1,7 @@