From 223b50db9ee064bc63e777cb4e452781a8422a35 Mon Sep 17 00:00:00 2001 From: Arman Date: Wed, 10 Aug 2022 17:29:08 +0200 Subject: [PATCH] feat: tooltip only shown when there are elipsis --- src/lib/actions/tooltip.ts | 6 +++++ src/lib/components/trim.svelte | 40 +++++++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/lib/actions/tooltip.ts b/src/lib/actions/tooltip.ts index 1636a14ec..d20196ddf 100644 --- a/src/lib/actions/tooltip.ts +++ b/src/lib/actions/tooltip.ts @@ -13,6 +13,12 @@ export const tooltip: Action> = (node, config) => { }); } }, + enable() { + instance.enable(); + }, + disable() { + instance.disable(); + }, destroy() { instance.destroy(); } diff --git a/src/lib/components/trim.svelte b/src/lib/components/trim.svelte index 610901554..0cd0b3be6 100644 --- a/src/lib/components/trim.svelte +++ b/src/lib/components/trim.svelte @@ -1,14 +1,44 @@ - + + +