diff --git a/src/components/BookingBreakdown/BookingBreakdown.css b/src/components/BookingBreakdown/BookingBreakdown.css index 70958790..1548e582 100644 --- a/src/components/BookingBreakdown/BookingBreakdown.css +++ b/src/components/BookingBreakdown/BookingBreakdown.css @@ -1,18 +1,54 @@ +@import '../../marketplace.css'; + .root { + padding-top: 6px; /* align with baseline */ display: flex; flex-direction: column; } -.row { +.lineItem { + @apply --marketplaceH4FontStyles; + margin: -1px 0 0 0; /* align with baseline */ + + @media (--desktopViewport) { + margin: -1px 0 0 0; /* align with baseline */ + } + display: flex; flex-direction: row; justify-content: space-between; } +.itemLabel { + margin-top: 1px; /* align with baseline */ +} + +.itemValue { + @apply --marketplaceDefaultFontStyles; +} + .totalDivider { + /* dimensions */ width: 100%; + height: 1px; + margin: 10px 0 13px 0; + + border: none; + background-color: var(--matterColorNegative); +} + +.totalLabel { + font-weight: var(--fontWeightSemiBold); + + /* Move so that baseline aligns with the total price */ + padding-top: 7px; } .totalPrice { - font-weight: bold; + @apply --marketplaceH2FontStyles; + margin: 0; + + @media (--desktopViewport) { + margin: 0; + } } diff --git a/src/components/BookingBreakdown/BookingBreakdown.example.js b/src/components/BookingBreakdown/BookingBreakdown.example.js index fa29792c..bcc06026 100644 --- a/src/components/BookingBreakdown/BookingBreakdown.example.js +++ b/src/components/BookingBreakdown/BookingBreakdown.example.js @@ -42,3 +42,14 @@ export const ProviderSaleZeroCommission = { totalPrice: new types.Money(7000, 'USD'), }, }; + +export const ProviderSaleSingleNight = { + component: BookingBreakdown, + props: { + bookingStart: new Date(Date.UTC(2017, 3, 14)), + bookingEnd: new Date(Date.UTC(2017, 3, 15)), + unitPrice: new types.Money(4500, 'USD'), + commission: new types.Money(2000, 'USD'), + totalPrice: new types.Money(2500, 'USD'), + }, +}; diff --git a/src/components/BookingBreakdown/BookingBreakdown.js b/src/components/BookingBreakdown/BookingBreakdown.js index f1f0bca0..8cc2276c 100644 --- a/src/components/BookingBreakdown/BookingBreakdown.js +++ b/src/components/BookingBreakdown/BookingBreakdown.js @@ -55,13 +55,11 @@ export const BookingBreakdownComponent = props => { : null; const commissionInfo = ( -
-
+
+ -
-
- {formattedCommission} -
+ + {formattedCommission}
); @@ -72,25 +70,21 @@ export const BookingBreakdownComponent = props => { return (
-
-
- -
-
- {formattedUnitPrice} -
+
+ + + + {formattedUnitPrice}
-
-
+
+ {bookingPeriod} -
-
- {nightCountMessage} -
+ + {nightCountMessage}
{commission ? commissionInfo : null}
-
+
diff --git a/src/components/BookingBreakdown/__snapshots__/BookingBreakdown.test.js.snap b/src/components/BookingBreakdown/__snapshots__/BookingBreakdown.test.js.snap index 5023726a..eb5dbf7a 100644 --- a/src/components/BookingBreakdown/__snapshots__/BookingBreakdown.test.js.snap +++ b/src/components/BookingBreakdown/__snapshots__/BookingBreakdown.test.js.snap @@ -3,31 +3,31 @@ exports[`BookingBreakdown customer transaction data matches snapshot 1`] = ` className="">
-
- Price per night: + Price per night -
-
+ 10 -
+
-
2017-04-14 - 2017-04-16 -
-
+ - 2 nights + * 2 nights -
+

@@ -36,7 +36,7 @@ exports[`BookingBreakdown customer transaction data matches snapshot 1`] = `
- Total: + Total price
-
- Price per night: + Price per night -
-
+ 10 -
+
-
2017-04-14 - 2017-04-16 -
-
+ - 2 nights + * 2 nights -
+

@@ -85,7 +85,7 @@ exports[`BookingBreakdown pretransaction data matches snapshot 1`] = `
- Total: + Total price
-
- Price per night: + Price per night -
-
+ 10 -
+
-
2017-04-14 - 2017-04-16 -
-
+ - 2 nights + * 2 nights -
+
-
Saunatime fee: -
-
+ -2 -
+

@@ -147,7 +147,7 @@ exports[`BookingBreakdown provider transaction data matches snapshot 1`] = `
- Total: + Total price