-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: factor tooltip component rollback image component
- Loading branch information
1 parent
c40df97
commit 1d6f908
Showing
10 changed files
with
82 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
73 changes: 0 additions & 73 deletions
73
packages/visualizations/src/components/Format/ImageFormat.svelte
This file was deleted.
Oops, something went wrong.
33 changes: 33 additions & 0 deletions
33
packages/visualizations/src/components/Format/Tooltip.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<script lang="ts"> | ||
import type { Content } from 'tippy.js'; | ||
import tippy from 'components/utils/tippy'; | ||
export let enabled = false; | ||
export let className: string | null = null; | ||
export let onShow: () => void; | ||
export let onHide: () => void; | ||
let tooltipContent: Content; | ||
</script> | ||
|
||
{#if enabled} | ||
<div | ||
role="button" | ||
tabindex="0" | ||
use:tippy={{ | ||
content: tooltipContent, | ||
theme: 'ods-visualization-table', | ||
delay: [500, 0], | ||
duration: [275, 0], | ||
maxWidth: 'none', | ||
onShow, | ||
onHide, | ||
}} | ||
> | ||
<slot /> | ||
<div bind:this={tooltipContent}> | ||
<slot name="tooltipContent" /> | ||
</div> | ||
</div> | ||
{:else} | ||
<slot /> | ||
{/if} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,5 +7,4 @@ export const DATA_FORMAT = { | |
boolean: 'boolean', | ||
url: 'url', | ||
geo: 'geo', | ||
image: 'image', | ||
} as const; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters