Skip to content

Commit

Permalink
feat: add nav and paging, and improve formatting
Browse files Browse the repository at this point in the history
- 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
  • Loading branch information
dtribble authored and michaelfig committed Aug 7, 2020
1 parent b7e6176 commit 9a22fc0
Show file tree
Hide file tree
Showing 9 changed files with 225 additions and 118 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ bundle-*.js
/.vagrant
.DS_Store
.vscode/
.idea/
10 changes: 9 additions & 1 deletion packages/dapp-svelte-wallet/ui/lib/ListCard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@
};
</script>

<style>
.actions {
margin: 1em 0 0 2em;
}
</style>

<section class="fullwidth px-2 py-2">
<slot name="title"></slot>

Expand Down Expand Up @@ -56,5 +62,7 @@
</List>
{/if}

<slot name="actions"></slot>
<div class="actions">
<slot name="actions"></slot>
</div>
</section>
6 changes: 5 additions & 1 deletion packages/dapp-svelte-wallet/ui/lib/ListItems.svelte
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script>
export let items;
export let idFn = item => item.id || item;
export let horizontal = false;
</script>

<style>
Expand All @@ -9,6 +10,9 @@
margin: 0;
padding: 0 0;
}
.horizontal {
display: inline-block;
}
</style>

<slot />
Expand All @@ -18,7 +22,7 @@
{:else}
<ul>
{#each items as item (idFn(item))}
<li class="list">
<li class={horizontal ? "horizontal" : ""}>
<slot name="item" {item} />
</li>
{/each}
Expand Down
15 changes: 15 additions & 0 deletions packages/dapp-svelte-wallet/ui/lib/MenuButton.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<script>
import Button from 'smelte/src/components/Button';
export let text = '';
export let id;
export let value = undefined;
export let color = undefined;
</script>

<div class={id === value ? "bg-secondary-transLighter" : ""}>
<Button outlined={id === value} text fab flat on:click={() => (value = id)} {color}>
{text}
<slot />
</Button>
</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 9a22fc0

Please sign in to comment.