From 75a525aa56320c18e813d0e8679e4471e65e91f4 Mon Sep 17 00:00:00 2001 From: Sebastian Pravda Date: Fri, 23 Dec 2022 17:48:55 +0100 Subject: [PATCH] feat: dynamic info button text --- .../src/lib/components/dashboard/DashboardInfoCard.svelte | 2 +- frontend/src/lib/components/dashboard/InfoButton.svelte | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte index acb3132..1f780c6 100644 --- a/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte +++ b/frontend/src/lib/components/dashboard/DashboardInfoCard.svelte @@ -59,7 +59,7 @@
- showDetails = !showDetails}> + showDetails = !showDetails}>
diff --git a/frontend/src/lib/components/dashboard/InfoButton.svelte b/frontend/src/lib/components/dashboard/InfoButton.svelte index 349a8ed..15402d6 100644 --- a/frontend/src/lib/components/dashboard/InfoButton.svelte +++ b/frontend/src/lib/components/dashboard/InfoButton.svelte @@ -4,6 +4,8 @@ import { createEventDispatcher } from 'svelte'; import { submissionProgress, UploadStatus } from '$lib/stores/portfolio'; + export let showDetails: boolean; + const dispatch = createEventDispatcher(); const showInfo = () => { @@ -16,10 +18,11 @@
+
showInfo()} on:keydown={(_) => showInfo()} use:tippy={{ - content: "Zobrazit osobní údaje", + content: (showDetails ? "Skrýt" : "Zobrazit") + " osobní údaje", placement: 'top', showOnCreate: false, delay: 0