Skip to content

Commit 9a22fc0

Browse files
dtribblemichaelfig
authored andcommitted
feat: add nav and paging, and improve formatting
- rename Transaction to Offer - added a Config panel - restructure main page layout to not use grid - structure app to have effectively panels controlled by top nav minor UI items: - add a button type for menus (TODO: show the selection correctly) - make ListItems support horizontal lists - align action buttons in ListCard
1 parent b7e6176 commit 9a22fc0

File tree

9 files changed

+225
-118
lines changed

9 files changed

+225
-118
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ bundle-*.js
5858
/.vagrant
5959
.DS_Store
6060
.vscode/
61+
.idea/

packages/dapp-svelte-wallet/ui/lib/ListCard.svelte

+9-1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
};
2424
</script>
2525

26+
<style>
27+
.actions {
28+
margin: 1em 0 0 2em;
29+
}
30+
</style>
31+
2632
<section class="fullwidth px-2 py-2">
2733
<slot name="title"></slot>
2834

@@ -56,5 +62,7 @@
5662
</List>
5763
{/if}
5864

59-
<slot name="actions"></slot>
65+
<div class="actions">
66+
<slot name="actions"></slot>
67+
</div>
6068
</section>

packages/dapp-svelte-wallet/ui/lib/ListItems.svelte

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<script>
22
export let items;
33
export let idFn = item => item.id || item;
4+
export let horizontal = false;
45
</script>
56

67
<style>
@@ -9,6 +10,9 @@
910
margin: 0;
1011
padding: 0 0;
1112
}
13+
.horizontal {
14+
display: inline-block;
15+
}
1216
</style>
1317

1418
<slot />
@@ -18,7 +22,7 @@
1822
{:else}
1923
<ul>
2024
{#each items as item (idFn(item))}
21-
<li class="list">
25+
<li class={horizontal ? "horizontal" : ""}>
2226
<slot name="item" {item} />
2327
</li>
2428
{/each}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script>
2+
import Button from 'smelte/src/components/Button';
3+
4+
export let text = '';
5+
export let id;
6+
export let value = undefined;
7+
export let color = undefined;
8+
</script>
9+
10+
<div class={id === value ? "bg-secondary-transLighter" : ""}>
11+
<Button outlined={id === value} text fab flat on:click={() => (value = id)} {color}>
12+
{text}
13+
<slot />
14+
</Button>
15+
</div>
Loading

0 commit comments

Comments
 (0)