Skip to content

Commit

Permalink
edits
Browse files Browse the repository at this point in the history
  • Loading branch information
LBondarchuk committed Jul 19, 2023
1 parent d0f992e commit 4850c38
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
5 changes: 5 additions & 0 deletions public/assests/images/Minus-disabled.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion src/components/pages/CartPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,13 @@ export const CartPage: React.FC = () => {
onClick={() => editCartItem(item, -1)}
className="cart__item--action"
type="submit"
style={{
pointerEvents: item.quantity === 1
? 'none'
: 'all',
}}
>
<img src="assests/images/Minus.svg" alt="icon minus" />
<img src={`assests/images/${item.quantity === 1 ? 'Minus-disabled' : 'Minus'}.svg`} alt="icon minus" />
</button>
<span className="cart__item--quantity">{item.quantity}</span>
<button
Expand Down
1 change: 1 addition & 0 deletions src/scss/pages/cart-page/cart-item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
&--quantity {
width: 15px;
text-align: center;
@include text(14px, 500, $primary-dark-color);
}

&--panel {
Expand Down

0 comments on commit 4850c38

Please sign in to comment.