Skip to content

Commit 628ee1a

Browse files
committed
Merge branch 'dev' into e2e-integrate
2 parents 745a350 + b67e169 commit 628ee1a

3 files changed

Lines changed: 27 additions & 7 deletions

File tree

packages/evershop/src/components/frontStore/checkout/CheckoutButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,10 @@ export function CheckoutButton() {
3737

3838
if (noShippingRequired && !billingAddress) {
3939
return (
40-
<div className="checkout-button-section">
40+
<div className="checkout-button-section mt-6">
4141
<button
4242
type="button"
43-
className="w-full bg-gray-400 text-white py-3 px-4 rounded-lg font-medium cursor-not-allowed"
43+
className="w-full bg-muted text-muted-foreground py-3 px-4 rounded-lg font-medium cursor-not-allowed"
4444
disabled
4545
>
4646
{_('Please provide billing address to proceed')}

packages/evershop/src/components/frontStore/checkout/OrderSummaryItems.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const OrderSummaryItems: React.FC<{
1818
}
1919

2020
return (
21-
<ul className="order__item__summary__list divide-y divide-gray-200 border-b mb-3">
21+
<ul className="order__item__summary__list divide-y divide-border border-b border-border mb-3">
2222
{items.map((item) => (
2323
<li key={item.uuid} className="flex items-start py-3">
2424
<div className="relative mr-4 self-center">
@@ -28,13 +28,13 @@ const OrderSummaryItems: React.FC<{
2828
height={100}
2929
src={item.thumbnail}
3030
alt={item.productName}
31-
className="w-16 h-16 object-cover rounded border p-2 box-border"
31+
className="w-16 h-16 object-cover rounded border p-2 box-border border-border"
3232
/>
3333
)}
3434
{!item.thumbnail && (
35-
<ProductNoThumbnail className="w-16 h-16 rounded border p-2 box-border" />
35+
<ProductNoThumbnail className="w-16 h-16 rounded border border-border p-2 box-border" />
3636
)}
37-
<span className="absolute -top-2 -right-2 bg-gray-200 rounded-full w-6 h-6 flex items-center justify-center text-gray-700 text-sm">
37+
<span className="absolute -top-2 -right-2 bg-muted rounded-full w-6 h-6 flex items-center justify-center text-muted-foreground text-sm">
3838
{item.qty}
3939
</span>
4040
</div>

packages/evershop/src/components/frontStore/checkout/payment/BillingAddress.tsx

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export function BillingAddress({
103103
handleAddressOptionChange(value as string);
104104
}}
105105
>
106-
{!noShippingRequired && (
106+
{!noShippingRequired ? (
107107
<>
108108
<Item variant={'outline'}>
109109
<ItemContent>
@@ -154,6 +154,26 @@ export function BillingAddress({
154154
</ItemContent>
155155
</Item>
156156
</>
157+
) : (
158+
<ItemDescription className="text-inherit mt-3">
159+
<div className="text-inherit bg-white">
160+
<CustomerAddressForm
161+
areaId="checkoutBillingAddressForm"
162+
fieldNamePrefix="billingAddress"
163+
address={undefined} // Always start empty for different address
164+
/>
165+
{noShippingRequired && (
166+
<Button
167+
onClick={() => handleGoToPayment()}
168+
variant="default"
169+
isLoading={addingBillingAddress}
170+
className="mt-4"
171+
>
172+
{_('Continue to payment')}
173+
</Button>
174+
)}
175+
</div>
176+
</ItemDescription>
157177
)}
158178
</RadioGroup>
159179
</ItemContent>

0 commit comments

Comments
 (0)