Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
fix(default-theme): order details styling (#1011)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkucmus authored Aug 11, 2020
1 parent e401f0d commit cdde791
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
21 changes: 20 additions & 1 deletion packages/default-theme/components/SwOrderDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
table__description: tableHeader === 'Item',
table__quantity: tableHeader === 'Quantity',
table__amount: tableHeader === 'Amount',
table__price: tableHeader === 'Price',
}"
>
{{ tableHeader }}
Expand Down Expand Up @@ -278,19 +279,37 @@ export default {
}
.table {
&__row {
flex-wrap: nowrap;
& > th {
order: unset;
}
}
&__data {
flex: 1;
order: unset;
text-align: center;
&:last-of-type {
text-align: right;
}
}
&__description {
flex: 3;
flex: 2;
}
&__quantity {
text-align: center;
flex: 1;
}
&__price {
flex: 1;
order: unset;
}
&__amount {
flex: 1;
text-align: right;
}
}
Expand Down
15 changes: 13 additions & 2 deletions packages/default-theme/components/SwOrderDetailsItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="product-title">{{ getName }}</div>
<div class="product-sku">{{ product.productNumber }}</div>
</SfTableData>
<SfTableData class="table__data">
<SfTableData class="table__data table__price">
<SfPrice :regular="getUnitPrice | price" class="product-price" />
</SfTableData>
<SfTableData class="table__data table__quantity">
Expand Down Expand Up @@ -58,16 +58,27 @@ export default {
}
</script>
<style lang="scss" scoped>
@import "~@storefront-ui/vue/styles";
.product-price {
white-space: nowrap;
}
.table {
& > td {
flex: 1;
order: unset;
}
&__data {
order: unset;
flex: 1;
--price-regular-font-weight: var(--font-normal);
}
&__description {
flex: 3;
padding-right: var(--spacer-sm);
order: unset;
flex: 2;
}
&__row:hover {
Expand Down

1 comment on commit cdde791

@vercel
Copy link

@vercel vercel bot commented on cdde791 Aug 11, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.