mirror of
https://github.com/danbulant/Portfolio
synced 2026-05-24 12:35:31 +00:00
feat: dynamic info button text
This commit is contained in:
parent
7fed62ff75
commit
75a525aa56
2 changed files with 5 additions and 2 deletions
|
|
@ -59,7 +59,7 @@
|
|||
<div class="mr-4">
|
||||
<div on:click on:keydown class="flex flex-col">
|
||||
<div class="flex flex-col h-20">
|
||||
<InfoButton on:download={downloadPortfolio} on:showInfo={(_) => showDetails = !showDetails}></InfoButton>
|
||||
<InfoButton bind:showDetails={showDetails} on:download={downloadPortfolio} on:showInfo={(_) => showDetails = !showDetails}></InfoButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -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 @@
|
|||
</script>
|
||||
|
||||
<div class="flex flex-col">
|
||||
<!-- TODO: better icon for "hide details"? -->
|
||||
<div class="flex flex-col">
|
||||
<span on:click={(_) => showInfo()} on:keydown={(_) => showInfo()}
|
||||
use:tippy={{
|
||||
content: "Zobrazit osobní údaje",
|
||||
content: (showDetails ? "Skrýt" : "Zobrazit") + " osobní údaje",
|
||||
placement: 'top',
|
||||
showOnCreate: false,
|
||||
delay: 0
|
||||
|
|
|
|||
Loading…
Reference in a new issue