Skip to content

Commit

Permalink
center add to cart when no prices
Browse files Browse the repository at this point in the history
  • Loading branch information
leanormandon committed Jun 3, 2024
1 parent 13754fb commit 6b802c4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
12 changes: 7 additions & 5 deletions components/Organisms/AddToCart/AddToCart.twig
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<div class='AddToCart'>
<div>
<div class='price{% if discount %}-promo{% endif %}'>{{ price }}</div>
{% if discount %}<div class='price'>{{ discount }}</div>{% endif %}
</div>
<div class='AddToCart {% if not price %}AddToCart--center{% endif %}'>
{% if price %}
<div>
<div class='price{% if discount %}-promo{% endif %}'>{{ price }}</div>
{% if discount %}<div class='price'>{{ discount }}</div>{% endif %}
</div>
{% endif %}
<div>
{% if unavailable %}
<span class='typo-button-large'>Produit indisponible</span>
Expand Down
3 changes: 3 additions & 0 deletions components/Organisms/AddToCart/addToCart.css
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
padding-top: rem-convert(16px);
padding-right: rem-convert(14px);
padding-left: rem-convert(23px);
&--center {
justify-content: center;
}
.price {
@apply h3;
color: var(--black);
Expand Down

0 comments on commit 6b802c4

Please sign in to comment.