Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 55 additions & 19 deletions packages/create-invoice-form/src/lib/invoice/form-view.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
}
</script>

<div style="display: flex; flex-direction: column; gap: 30px;">
<div class="invoice-form-container">
<div class="invoice-form-wrapper">
<div class="invoice-header">
<div class="invoice-header-left">
Expand Down Expand Up @@ -139,7 +139,7 @@
<div class="invoice-section">
<p class="invoice-section-title">
<span>From</span>
{formData.creatorId}
<span class="invoice-section-title-content">{formData.creatorId}</span>
</p>
<div class={`invoice-info`}>
{#each sellerInfo as { value, isEmail, isCompany }}
Expand All @@ -157,34 +157,47 @@
<div class="invoice-section">
<p class="invoice-section-title">
<span>Billed to</span>
{formData.payerAddress}
<span class="invoice-section-title-content">
{formData.payerAddress}
</span>
</p>
<div class={`invoice-info`}>
{#each buyerInfo as { value, isEmail, isCompany }}
<p>
{#if isEmail}
<a href="mailto:{value}">{value}</a>
{:else}
<span class:company={isCompany}>{value}</span>
<span
class:company={isCompany}
class="invoice-section-title-content"
>
{value}
</span>
{/if}
</p>
{/each}
</div>
</div>
<p class="invoice-section-title">
<span>Payment Chain</span>
{currency?.network
? currency.network.charAt(0).toUpperCase() +
currency.network.slice(1).toLowerCase()
: ""}
<span class="invoice-section-title-content">
{currency?.network
? currency.network.charAt(0).toUpperCase() +
currency.network.slice(1).toLowerCase()
: ""}
</span>
</p>
<p class="invoice-section-title">
<span>Invoice Currency</span>
{invoiceCurrency ? invoiceCurrency.symbol : ""}
<span class="invoice-section-title-content">
{invoiceCurrency ? invoiceCurrency.symbol : ""}
</span>
</p>
<p class="invoice-section-title">
<span>Settlement Currency</span>
{currency ? `${currency.symbol} (${currency.network})` : ""}
<span class="invoice-section-title-content">
{currency ? `${currency.symbol} (${currency.network})` : ""}
</span>
</p>
<div class="invoice-table-wrapper">
<table class="invoice-table">
Expand Down Expand Up @@ -275,6 +288,16 @@
border-collapse: collapse;
border-spacing: 0;
}

.invoice-form-container {
display: flex;
flex-direction: column;
gap: 30px;
border-top: 6px solid var(--mainColor);
border-radius: 8px;
overflow: hidden;
}

.invoice-form-wrapper {
height: fit-content;
background-color: white;
Expand Down Expand Up @@ -390,39 +413,49 @@
.invoice-table-wrapper {
position: relative;
overflow-x: auto;
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
border-radius: 8px;
}

.invoice-table {
width: 100%;
font-size: 14px;
line-height: 20px;
text-align: left;
color: #6b7280;
border-radius: 8px;
overflow: hidden;
border-collapse: collapse;
border-spacing: 0;
}

.invoice-table-header {
font-size: 12px;
line-height: 20px;
text-transform: uppercase;
background-color: #e4e4e7;
background-color: #f6f6f7;
color: black;
border: none;
border-collapse: collapse;
}

.invoice-table-header tr {
text-align: left;
white-space: nowrap;
font-size: 14px;
}

.invoice-table-header tr th {
padding: 12px 8px;
padding: 12px 16px;
font-size: 11px;
white-space: nowrap;
border: none;
border-spacing: 0;
background-color: #f6f6f7;
}

.invoice-table-header-tr:first-child {
padding: 12px 8px 12px 8px;
}

.invoice-table-body-row {
border-bottom: 1px solid black;
}

.invoice-table-body-row th {
padding: 8px 0px 8px 8px;
font-weight: 500;
Expand Down Expand Up @@ -450,7 +483,6 @@
.invoice-summary-item {
display: flex;
gap: 20px;
border-bottom: 1px solid black;
}

.invoice-summary-item-spaced {
Expand Down Expand Up @@ -530,4 +562,8 @@
height: 1px;
background-color: var(--mainColor);
}

.invoice-section-title-content {
color: #6e7480;
}
</style>
21 changes: 4 additions & 17 deletions packages/create-invoice-form/src/lib/invoice/form.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@
id="note"
{handleInput}
type="textarea"
placeholder="Memo"
label="Memo"
value={formData.note}
/>
<Labels {config} bind:formData />
Expand Down Expand Up @@ -633,6 +633,7 @@
box-shadow: 0 4px 4px rgba(0, 0, 0, 0.06);
gap: 20px;
box-sizing: border-box;
min-width: 700px;
}

.invoice-form-container {
Expand Down Expand Up @@ -799,8 +800,8 @@

.invoice-form-label-wrapper {
display: flex;
align-items: center;
gap: 16px;
flex-direction: column;
gap: 8px;
height: fit-content;
width: 100%;
}
Expand All @@ -810,25 +811,11 @@
font-size: 12px;
}

:global(.invoice-form-label-wrapper .input-wrapper) {
flex: 1;
}

:global(.invoice-form-label-wrapper svg, .invoice-form-label-wrapper path) {
color: white;
fill: white;
}

:global(.invoice-form-label-wrapper .input-wrapper .textarea-input) {
width: 100%;
height: 107px;
}

:global(.invoice-form-label-wrapper .labels-wrapper) {
flex: 1;
margin-right: 8px;
}

:global(.invoice-form-table-body-add-item button) {
padding: 6px 14px !important;
width: fit-content !important;
Expand Down
3 changes: 0 additions & 3 deletions shared/components/labels.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,8 @@
.labels-wrapper {
display: flex;
flex-direction: column;
width: 700px;
justify-content: end;
gap: 10px;
min-height: 104px;
}

.labels-container {
Expand Down Expand Up @@ -109,7 +107,6 @@
border: 1px solid #d1d5db;
border-radius: 4px;
padding: 4px 8px;
width: 100%;
}

.label-input:hover {
Expand Down
Loading