Skip to content

Commit

Permalink
fix: tooltips within ListCards now work
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelfig committed Aug 7, 2020
1 parent 29555fa commit e389dd1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/dapp-svelte-wallet/ui/lib/ListCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<List {items}>
<li slot="item" class="px-1" let:item>
<div class="fullwidth px-1">
<ListItem dense selectedClasses="bg-primary-trans" {item} {...item} on:click={() => toggle(item.id)}>
<ListItem dense classes="overflow-visible" selectedClasses="bg-primary-trans" {item} {...item} on:click={() => toggle(item.id)}>
<div class="flex items-center">
<Icon tip={expanded.includes(item.id)}>{expandIcon}</Icon>
<slot name="item-header" {item}><span>{item.text}</span></slot>
Expand Down
14 changes: 7 additions & 7 deletions packages/dapp-svelte-wallet/ui/src/Amount.svelte
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script>
import Petname from "./Petname.svelte";
import Debug from "../lib/Debug.svelte";
import Tooltip from "../lib/Tooltip.svelte";
import Tooltip from "smelte/src/components/Tooltip";
export let amount;
Expand All @@ -11,17 +11,17 @@
</script>

<style>
section, div {
display: inline;
.dotted-underline {
border-bottom: 1px dotted black;
}
</style>

<section>
<div>
{#if Array.isArray(value) && value.length !== 0}
<!-- amount is non-fungible -->
<Tooltip>
<div slot="activator">
<b>
<b class="dotted-underline">
{value.length}
<Petname name={brand.petname} plural={value.length !== 1} />
</b>
Expand All @@ -31,7 +31,7 @@
instance: {petname}, inviteDesc: {inviteDesc}
{/each}
{:else}
{#each value as elem (elem)}{JSON.stringify(elem)}{/each}
{value.map(v => JSON.stringify(v)).join(', ')}
{/if}
</Tooltip>
{:else}
Expand All @@ -41,4 +41,4 @@
</b>
{/if}

</section>
</div>

0 comments on commit e389dd1

Please sign in to comment.