File tree 3 files changed +18
-5
lines changed
3 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -48,14 +48,14 @@ const hideZeroBalances = writable(true)
48
48
</button >
49
49
</div >
50
50
51
- <div class =" flex flex-col overflow-y-auto" >
51
+ <div class =" flex flex-col overflow-y-auto gap-2 py-2 " >
52
52
{#each intents .baseTokens ?? [] as token }
53
53
{#if ! $hideZeroBalances || token .balance !== " 0" }
54
54
<button
55
- class =" px-2 py-1 hover:bg-neutral-400 dark:hover:bg-neutral-800 text-md flex justify-start items-center"
55
+ class =" px-4 py-1 hover:bg-neutral-400 dark:hover:bg-neutral-800 text-sm flex justify-start items-center"
56
56
on:click ={() => setAsset (token .denom )}
57
57
>
58
- <Token chainId ={$rawIntents .source } denom ={token .denom } amount ={token .balance } {chains }/>
58
+ <Token stackedView highlightEnabled ={ false } chainId ={$rawIntents .source } denom ={token .denom } amount ={token .balance } {chains }/>
59
59
</button >
60
60
{/if }
61
61
{/each }
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export let onSelectAsset: Props["onSelectAsset"]
30
30
on:click ={onSelectAsset }
31
31
>
32
32
{#if $rawIntents .asset }
33
- <Token {chains } chainId ={$rawIntents .source } denom ={$rawIntents .asset }/>
33
+ <Token highlightEnabled ={ false } showWrapping ={ false } {chains } chainId ={$rawIntents .source } denom ={$rawIntents .asset }/>
34
34
{:else }
35
35
Select Asset
36
36
{/if }
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export let userAmount: string | null = null
20
20
export let expanded = false
21
21
export let highlightEnabled = true
22
22
export let showWrapping = true
23
+ export let stackedView = false
23
24
24
25
let tokenInfo = derived (
25
26
tokenInfos ,
@@ -57,6 +58,7 @@ onMount(() => {
57
58
<span class ={cn (" inline-flex gap-1" , highlightEnabled && $highlightItem ?.kind === " token" && $highlightItem .denom === denom ? " bg-union-accent-300 dark:bg-union-accent-950" : " " )}><b ><Truncate
58
59
value ={token .combined .symbol } type =" symbol" /></b >
59
60
{#if showWrapping }
61
+ {#if ! stackedView }
60
62
<div class =" text-muted-foreground text-xs flex gap-1 items-center" >
61
63
{toDisplayName (chainId , chains )}
62
64
{#each token .combined .wrapping as wrapping }
@@ -65,8 +67,19 @@ onMount(() => {
65
67
chains ,
66
68
)}
67
69
{/each }
68
- </div >{/if }</span >
70
+ </div >{/if }{ /if } </span >
69
71
</div >
72
+ {#if stackedView }
73
+ <div class =" text-muted-foreground text-xs flex gap-1 items-center -mt-1" >
74
+ {toDisplayName (chainId , chains )}
75
+ {#each token .combined .wrapping as wrapping }
76
+ <ArrowLeftIcon />{toDisplayName (
77
+ wrapping .unwrapped_chain .chain_id ,
78
+ chains ,
79
+ )}
80
+ {/each }
81
+ </div >
82
+ {/if }
70
83
{#if expanded }
71
84
<div class =" text-xs flex flex-col gap gap-4 text-muted-foreground" >
72
85
<section >
You can’t perform that action at this time.
0 commit comments