mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
chore: update TreeView, HeaderAction icon types
This commit is contained in:
parent
fcfe3c3ae4
commit
d080576c8a
6 changed files with 9 additions and 16 deletions
|
@ -1608,19 +1608,12 @@ export interface HeaderActionSlideTransition {
|
||||||
|
|
||||||
### Props
|
### Props
|
||||||
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
|
||||||
| :--------- | :--------------- | :------- | :----------------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
|
||||||
| ref | <code>let</code> | Yes | <code>null | HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
|
|
||||||
| isOpen | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the panel |
|
|
||||||
| icon | <code>let</code> | No | <code>typeof import("carbon-icons-svelte").CarbonIcon</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
|
||||||
| closeIcon | <code>let</code> | No | <code>typeof import("carbon-icons-svelte").CarbonIcon</code> | -- | Specify the close icon from `carbon-icons-svelte` to render |
|
|
||||||
| text | <code>let</code> | No | <code>string</code> | -- | Specify the text<br />Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) |
|
|
||||||
| transition | <code>let</code> | No | <code>false | HeaderActionSlideTransition</code> | <code>{ duration: 200 }</code> | Customize the panel transition (i.e., `transition:slide`)<br />Set to `false` to disable the transition |
|
|
||||||
| Prop name | Kind | Reactive | Type | Default value | Description |
|
| Prop name | Kind | Reactive | Type | Default value | Description |
|
||||||
| :--------- | :--------------- | :------- | :---------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
| :--------- | :--------------- | :------- | :---------------------------------------------------- | ------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
||||||
| ref | <code>let</code> | Yes | <code>null | HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
|
| ref | <code>let</code> | Yes | <code>null | HTMLButtonElement</code> | <code>null</code> | Obtain a reference to the button HTML element |
|
||||||
| isOpen | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the panel |
|
| isOpen | <code>let</code> | Yes | <code>boolean</code> | <code>false</code> | Set to `true` to open the panel |
|
||||||
| icon | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
| icon | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent</code> | -- | Specify the icon from `carbon-icons-svelte` to render |
|
||||||
|
| closeIcon | <code>let</code> | No | <code>typeof import("svelte").SvelteComponent</code> | -- | Specify the close icon from `carbon-icons-svelte` to render |
|
||||||
| text | <code>let</code> | No | <code>string</code> | -- | Specify the text<br />Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) |
|
| text | <code>let</code> | No | <code>string</code> | -- | Specify the text<br />Alternatively, use the named slot "text" (e.g., <div slot="text">...</div>) |
|
||||||
| transition | <code>let</code> | No | <code>false | HeaderActionSlideTransition</code> | <code>{ duration: 200 }</code> | Customize the panel transition (i.e., `transition:slide`)<br />Set to `false` to disable the transition |
|
| transition | <code>let</code> | No | <code>false | HeaderActionSlideTransition</code> | <code>{ duration: 200 }</code> | Customize the panel transition (i.e., `transition:slide`)<br />Set to `false` to disable the transition |
|
||||||
|
|
||||||
|
@ -4753,7 +4746,7 @@ export type TreeNodeId = string | number;
|
||||||
export interface TreeNode {
|
export interface TreeNode {
|
||||||
id: TreeNodeId;
|
id: TreeNodeId;
|
||||||
text: string;
|
text: string;
|
||||||
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
|
icon?: typeof import("svelte").SvelteComponent;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
expanded?: boolean;
|
expanded?: boolean;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4383,7 +4383,7 @@
|
||||||
"name": "closeIcon",
|
"name": "closeIcon",
|
||||||
"kind": "let",
|
"kind": "let",
|
||||||
"description": "Specify the close icon from `carbon-icons-svelte` to render",
|
"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,
|
"isFunction": false,
|
||||||
"isFunctionDeclaration": false,
|
"isFunctionDeclaration": false,
|
||||||
"constant": false,
|
"constant": false,
|
||||||
|
@ -13252,9 +13252,9 @@
|
||||||
"ts": "type TreeNodeId = string | number"
|
"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",
|
"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" }
|
"rest_props": { "type": "Element", "name": "ul" }
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
/**
|
/**
|
||||||
* @typedef {string | number} TreeNodeId
|
* @typedef {string | number} TreeNodeId
|
||||||
* @typedef {{ id: TreeNodeId; text: string; icon?: typeof import("carbon-icons-svelte").CarbonIcon; disabled?: boolean; expanded?: boolean; }} TreeNode
|
* @typedef {{ id: TreeNodeId; text: string; icon?: typeof import("svelte").SvelteComponent; disabled?: boolean; expanded?: boolean; }} TreeNode
|
||||||
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} select
|
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} select
|
||||||
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} toggle
|
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} toggle
|
||||||
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} focus
|
* @event {TreeNode & { expanded: boolean; leaf: boolean; }} focus
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the close icon from `carbon-icons-svelte` to render
|
* Specify the close icon from `carbon-icons-svelte` to render
|
||||||
* @type {typeof import("carbon-icons-svelte").CarbonIcon}
|
* @type {typeof import("svelte").SvelteComponent}
|
||||||
*/
|
*/
|
||||||
export let closeIcon = Close20;
|
export let closeIcon = Close20;
|
||||||
|
|
||||||
|
|
2
types/TreeView/TreeView.d.ts
vendored
2
types/TreeView/TreeView.d.ts
vendored
|
@ -6,7 +6,7 @@ export type TreeNodeId = string | number;
|
||||||
export interface TreeNode {
|
export interface TreeNode {
|
||||||
id: TreeNodeId;
|
id: TreeNodeId;
|
||||||
text: string;
|
text: string;
|
||||||
icon?: typeof import("carbon-icons-svelte").CarbonIcon;
|
icon?: typeof import("svelte").SvelteComponent;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
expanded?: boolean;
|
expanded?: boolean;
|
||||||
}
|
}
|
||||||
|
|
2
types/UIShell/GlobalHeader/HeaderAction.d.ts
vendored
2
types/UIShell/GlobalHeader/HeaderAction.d.ts
vendored
|
@ -23,7 +23,7 @@ export interface HeaderActionProps
|
||||||
/**
|
/**
|
||||||
* Specify the close icon from `carbon-icons-svelte` to render
|
* Specify the close icon from `carbon-icons-svelte` to render
|
||||||
*/
|
*/
|
||||||
closeIcon?: typeof import("carbon-icons-svelte").CarbonIcon;
|
closeIcon?: typeof import("svelte").SvelteComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Specify the text
|
* Specify the text
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue