mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-18 11:36:36 +00:00
feat(tooltip): elevate z-index of tooltip when open
This commit is contained in:
parent
c11fa9465c
commit
6a609240cd
2 changed files with 7 additions and 2 deletions
|
@ -4,7 +4,9 @@
|
||||||
import Preview from "../../components/Preview.svelte";
|
import Preview from "../../components/Preview.svelte";
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
### Default (icon-only, "bottom" direction)
|
### Default
|
||||||
|
|
||||||
|
By default, the tooltip is triggered by an information icon.
|
||||||
|
|
||||||
<Tooltip tooltipBodyId="tooltip-body">
|
<Tooltip tooltipBodyId="tooltip-body">
|
||||||
<p id="tooltip-body">
|
<p id="tooltip-body">
|
||||||
|
|
|
@ -171,7 +171,10 @@
|
||||||
}
|
}
|
||||||
}}" />
|
}}" />
|
||||||
|
|
||||||
<div {...$$restProps} style="{$$restProps.style}; position: relative;">
|
<div
|
||||||
|
{...$$restProps}
|
||||||
|
style="{open ? 'z-index: 1;' : ''}{$$restProps.style}; position: relative;"
|
||||||
|
>
|
||||||
{#if !hideIcon}
|
{#if !hideIcon}
|
||||||
<div bind:this="{ref}" id="{triggerId}" class:bx--tooltip__label="{true}">
|
<div bind:this="{ref}" id="{triggerId}" class:bx--tooltip__label="{true}">
|
||||||
<slot name="triggerText">{triggerText}</slot>
|
<slot name="triggerText">{triggerText}</slot>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue