Skip to content

Commit 7763fe6

Browse files
committed
feat: add new design
1 parent bd924c9 commit 7763fe6

File tree

3 files changed

+58
-24
lines changed

3 files changed

+58
-24
lines changed

packages/invoice-dashboard/src/lib/dashboard/drawer.svelte

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
11
<script lang="ts">
2+
import type { IConfig } from "@requestnetwork/shared-types";
23
import Close from "@requestnetwork/shared-icons/close.svelte";
34
45
export let active = false;
56
export let onClose: () => void;
6-
7+
export let config: IConfig;
78
let drawerElement: HTMLElement;
89
</script>
910

1011
<div
1112
class={`drawer-overlay ${active ? "active-overlay" : "hidden"}`}
1213
on:click|stopPropagation={onClose}
1314
></div>
14-
<div bind:this={drawerElement} class={`drawer ${active ? "active" : "hidden"}`}>
15+
<div
16+
bind:this={drawerElement}
17+
class={`drawer ${active ? "active" : "hidden"}`}
18+
style="--mainColor: {config.colors.main}; --secondaryColor: {config.colors
19+
.secondary};"
20+
>
1521
<div class="innerDrawer">
1622
<button class="close" on:click={onClose} aria-label="Close drawer">
1723
<Close />
@@ -54,7 +60,6 @@
5460
overflow-y: auto;
5561
overflow-x: hidden;
5662
transform: translateX(0);
57-
padding-right: 20px;
5863
}
5964
6065
@media only screen and (max-width: 880px) {
@@ -68,7 +73,6 @@
6873
6974
.innerDrawer {
7075
position: relative;
71-
width: 100%;
7276
height: 100%;
7377
padding: 1rem;
7478
overflow: hidden;
@@ -78,6 +82,7 @@
7882
box-shadow:
7983
0 10px 15px -3px rgb(0 0 0 / 0.1),
8084
0 4px 6px -4px rgb(0 0 0 / 0.1);
85+
border-top: 6px solid var(--mainColor);
8186
}
8287
8388
.close {
@@ -122,4 +127,21 @@
122127
visibility: hidden;
123128
transform: translateX(100%);
124129
}
130+
131+
.drawer::-webkit-scrollbar {
132+
width: 8px;
133+
}
134+
135+
.drawer::-webkit-scrollbar-track {
136+
padding-top: 20px;
137+
background-color: white;
138+
border-top-right-radius: 0.375rem;
139+
border-bottom-right-radius: 0.375rem;
140+
}
141+
142+
.drawer::-webkit-scrollbar-thumb {
143+
border-radius: 4px;
144+
padding-top: 20px;
145+
background-color: #888;
146+
}
125147
</style>

packages/invoice-dashboard/src/lib/dashboard/invoice-view.svelte

Lines changed: 31 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -712,50 +712,61 @@
712712
.table-container {
713713
position: relative;
714714
overflow-x: auto;
715+
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
716+
border-radius: 8px;
715717
}
716718
717719
.invoice-table {
718720
width: 100%;
721+
font-size: 14px;
722+
line-height: 20px;
719723
text-align: left;
720-
font-size: 0.875rem;
724+
color: #6b7280;
725+
border-radius: 8px;
726+
overflow: hidden;
727+
border-collapse: collapse;
728+
border-spacing: 0;
721729
}
722730
723731
.table-header {
732+
line-height: 20px;
724733
text-transform: uppercase;
725-
background-color: #e0e0e0;
734+
background-color: #f6f6f7;
735+
color: black;
736+
border: none;
737+
border-collapse: collapse;
726738
}
727739
728-
.table-row {
740+
.table-header tr {
729741
text-align: left;
742+
font-size: 14px;
730743
}
731744
732-
.table-header-cell {
733-
padding: 0.75rem 0.5rem;
734-
}
735-
736-
@media only screen and (max-width: 880px) {
737-
.table-header-cell {
738-
white-space: nowrap;
739-
}
745+
.table-header tr th {
746+
padding: 12px 16px;
747+
font-size: 11px;
748+
white-space: nowrap;
749+
border: none;
750+
border-spacing: 0;
751+
background-color: #f6f6f7;
740752
}
741753
742-
.table-header-cell.description {
743-
padding-left: 0.5rem;
754+
.table-row th,
755+
.table-row td {
756+
padding: 12px 16px;
744757
}
745758
746-
.item-row {
747-
border-bottom: 1px solid black;
759+
.table-row th p {
760+
margin: 0;
748761
}
749762
750763
.item-description {
751-
padding-left: 0.5rem;
752-
font-weight: 500;
753-
white-space: nowrap;
764+
width: 250px !important;
765+
font-weight: normal;
754766
}
755767
756768
.truncate {
757-
display: block;
758-
width: 150px;
769+
width: 100%;
759770
overflow: hidden;
760771
text-overflow: ellipsis;
761772
white-space: nowrap;

packages/invoice-dashboard/src/lib/view-requests.svelte

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@
692692
</tbody>
693693
</table>
694694
<Drawer
695+
config={activeConfig}
695696
active={activeRequest !== undefined}
696697
onClose={handleRemoveSelectedRequest}
697698
>

0 commit comments

Comments
 (0)