diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index f478c494..b58846ef 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -4523,6 +4523,7 @@ None. | ref | let | Yes | null | HTMLButtonElement | null | Obtain a reference to the button HTML element | | tooltipText | let | No | string | "" | Specify the tooltip text.
Alternatively, use the "tooltipText" slot | | icon | let | No | typeof import("carbon-icons-svelte").CarbonIcon | -- | Specify the icon from `carbon-icons-svelte` to render | +| disabled | let | No | boolean | false | Set to `true` to disable the tooltip icon | | align | let | No | "start" | "center" | "end" | "center" | Set the alignment of the tooltip relative to the icon | | direction | let | No | "top" | "right" | "bottom" | "left" | "bottom" | Set the direction of the tooltip relative to the icon | | id | let | No | string | "ccs-" + Math.random().toString(36) | Set an id for the span element | diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index a2e0c478..dd36608f 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -11423,6 +11423,16 @@ "constant": false, "reactive": false }, + { + "name": "disabled", + "kind": "let", + "description": "Set to `true` to disable the tooltip icon", + "type": "boolean", + "value": "false", + "isFunction": false, + "constant": false, + "reactive": false + }, { "name": "align", "kind": "let", diff --git a/docs/src/pages/components/TooltipIcon.svx b/docs/src/pages/components/TooltipIcon.svx index e60a9a3e..96500eac 100644 --- a/docs/src/pages/components/TooltipIcon.svx +++ b/docs/src/pages/components/TooltipIcon.svx @@ -22,4 +22,8 @@ Use the "text" slot to customize the tooltip text. Carbon is an open source design system by IBM. - \ No newline at end of file + + +### Disabled + + \ No newline at end of file diff --git a/src/TooltipIcon/TooltipIcon.svelte b/src/TooltipIcon/TooltipIcon.svelte index 7575e951..ef76e957 100644 --- a/src/TooltipIcon/TooltipIcon.svelte +++ b/src/TooltipIcon/TooltipIcon.svelte @@ -11,6 +11,9 @@ */ export let icon = undefined; + /** Set to `true` to disable the tooltip icon */ + export let disabled = false; + /** * Set the alignment of the tooltip relative to the icon * @type {"start" | "center" | "end"} @@ -41,10 +44,11 @@