Skip to content

Commit 8a9ad46

Browse files
committed
feat: added new design changes
1 parent bd924c9 commit 8a9ad46

File tree

3 files changed

+60
-40
lines changed

3 files changed

+60
-40
lines changed

packages/create-invoice-form/src/lib/invoice/form-view.svelte

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
}
101101
</script>
102102

103-
<div style="display: flex; flex-direction: column; gap: 30px;">
103+
<div class="invoice-form-container">
104104
<div class="invoice-form-wrapper">
105105
<div class="invoice-header">
106106
<div class="invoice-header-left">
@@ -139,7 +139,7 @@
139139
<div class="invoice-section">
140140
<p class="invoice-section-title">
141141
<span>From</span>
142-
{formData.creatorId}
142+
<span class="invoice-section-title-content">{formData.creatorId}</span>
143143
</p>
144144
<div class={`invoice-info`}>
145145
{#each sellerInfo as { value, isEmail, isCompany }}
@@ -157,34 +157,47 @@
157157
<div class="invoice-section">
158158
<p class="invoice-section-title">
159159
<span>Billed to</span>
160-
{formData.payerAddress}
160+
<span class="invoice-section-title-content">
161+
{formData.payerAddress}
162+
</span>
161163
</p>
162164
<div class={`invoice-info`}>
163165
{#each buyerInfo as { value, isEmail, isCompany }}
164166
<p>
165167
{#if isEmail}
166168
<a href="mailto:{value}">{value}</a>
167169
{:else}
168-
<span class:company={isCompany}>{value}</span>
170+
<span
171+
class:company={isCompany}
172+
class="invoice-section-title-content"
173+
>
174+
{value}
175+
</span>
169176
{/if}
170177
</p>
171178
{/each}
172179
</div>
173180
</div>
174181
<p class="invoice-section-title">
175182
<span>Payment Chain</span>
176-
{currency?.network
177-
? currency.network.charAt(0).toUpperCase() +
178-
currency.network.slice(1).toLowerCase()
179-
: ""}
183+
<span class="invoice-section-title-content">
184+
{currency?.network
185+
? currency.network.charAt(0).toUpperCase() +
186+
currency.network.slice(1).toLowerCase()
187+
: ""}
188+
</span>
180189
</p>
181190
<p class="invoice-section-title">
182191
<span>Invoice Currency</span>
183-
{invoiceCurrency ? invoiceCurrency.symbol : ""}
192+
<span class="invoice-section-title-content">
193+
{invoiceCurrency ? invoiceCurrency.symbol : ""}
194+
</span>
184195
</p>
185196
<p class="invoice-section-title">
186197
<span>Settlement Currency</span>
187-
{currency ? `${currency.symbol} (${currency.network})` : ""}
198+
<span class="invoice-section-title-content">
199+
{currency ? `${currency.symbol} (${currency.network})` : ""}
200+
</span>
188201
</p>
189202
<div class="invoice-table-wrapper">
190203
<table class="invoice-table">
@@ -275,6 +288,16 @@
275288
border-collapse: collapse;
276289
border-spacing: 0;
277290
}
291+
292+
.invoice-form-container {
293+
display: flex;
294+
flex-direction: column;
295+
gap: 30px;
296+
border-top: 6px solid var(--mainColor);
297+
border-radius: 8px;
298+
overflow: hidden;
299+
}
300+
278301
.invoice-form-wrapper {
279302
height: fit-content;
280303
background-color: white;
@@ -390,39 +413,49 @@
390413
.invoice-table-wrapper {
391414
position: relative;
392415
overflow-x: auto;
416+
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
417+
border-radius: 8px;
393418
}
394419
395420
.invoice-table {
396421
width: 100%;
397422
font-size: 14px;
398423
line-height: 20px;
399424
text-align: left;
425+
color: #6b7280;
426+
border-radius: 8px;
427+
overflow: hidden;
428+
border-collapse: collapse;
429+
border-spacing: 0;
400430
}
401431
402432
.invoice-table-header {
403-
font-size: 12px;
404433
line-height: 20px;
405434
text-transform: uppercase;
406-
background-color: #e4e4e7;
435+
background-color: #f6f6f7;
436+
color: black;
437+
border: none;
438+
border-collapse: collapse;
407439
}
408440
409441
.invoice-table-header tr {
410442
text-align: left;
411-
white-space: nowrap;
443+
font-size: 14px;
412444
}
413445
414446
.invoice-table-header tr th {
415-
padding: 12px 8px;
447+
padding: 12px 16px;
448+
font-size: 11px;
449+
white-space: nowrap;
450+
border: none;
451+
border-spacing: 0;
452+
background-color: #f6f6f7;
416453
}
417454
418455
.invoice-table-header-tr:first-child {
419456
padding: 12px 8px 12px 8px;
420457
}
421458
422-
.invoice-table-body-row {
423-
border-bottom: 1px solid black;
424-
}
425-
426459
.invoice-table-body-row th {
427460
padding: 8px 0px 8px 8px;
428461
font-weight: 500;
@@ -450,7 +483,6 @@
450483
.invoice-summary-item {
451484
display: flex;
452485
gap: 20px;
453-
border-bottom: 1px solid black;
454486
}
455487
456488
.invoice-summary-item-spaced {
@@ -530,4 +562,8 @@
530562
height: 1px;
531563
background-color: var(--mainColor);
532564
}
565+
566+
.invoice-section-title-content {
567+
color: #6e7480;
568+
}
533569
</style>

packages/create-invoice-form/src/lib/invoice/form.svelte

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -588,8 +588,8 @@
588588
max={200}
589589
id="note"
590590
{handleInput}
591-
type="textarea"
592-
placeholder="Memo"
591+
type="text"
592+
label="Memo"
593593
value={formData.note}
594594
/>
595595
<Labels {config} bind:formData />
@@ -626,6 +626,7 @@
626626
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
627627
gap: 20px;
628628
box-sizing: border-box;
629+
min-width: 700px;
629630
}
630631
631632
.invoice-form-container {
@@ -792,8 +793,8 @@
792793
793794
.invoice-form-label-wrapper {
794795
display: flex;
795-
align-items: center;
796-
gap: 16px;
796+
flex-direction: column;
797+
gap: 8px;
797798
height: fit-content;
798799
width: 100%;
799800
}
@@ -803,25 +804,11 @@
803804
font-size: 12px;
804805
}
805806
806-
:global(.invoice-form-label-wrapper .input-wrapper) {
807-
flex: 1;
808-
}
809-
810807
:global(.invoice-form-label-wrapper svg, .invoice-form-label-wrapper path) {
811808
color: white;
812809
fill: white;
813810
}
814811
815-
:global(.invoice-form-label-wrapper .input-wrapper .textarea-input) {
816-
width: 100%;
817-
height: 107px;
818-
}
819-
820-
:global(.invoice-form-label-wrapper .labels-wrapper) {
821-
flex: 1;
822-
margin-right: 8px;
823-
}
824-
825812
:global(.invoice-form-table-body-add-item button) {
826813
padding: 6px 14px !important;
827814
width: fit-content !important;

shared/components/labels.svelte

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,8 @@
7575
.labels-wrapper {
7676
display: flex;
7777
flex-direction: column;
78-
width: 700px;
7978
justify-content: end;
8079
gap: 10px;
81-
min-height: 104px;
8280
}
8381
8482
.labels-container {
@@ -109,7 +107,6 @@
109107
border: 1px solid #d1d5db;
110108
border-radius: 4px;
111109
padding: 4px 8px;
112-
width: 100%;
113110
}
114111
115112
.label-input:hover {

0 commit comments

Comments
 (0)