-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from fs-jun24-team-3/featch/cartLayout
Featch/cart layout
- Loading branch information
Showing
18 changed files
with
421 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ export const App = () => { | |
<> | ||
<Header /> | ||
<Outlet /> | ||
|
||
<Footer /> | ||
</> | ||
); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
.cartItem { | ||
align-items: center; | ||
border: 1px solid $elemnts-color; | ||
background-color: #fff; | ||
border-radius: 16px; | ||
padding: 16px; | ||
grid-column: 1/-1; | ||
|
||
@include onTablet { | ||
padding: 24px; | ||
grid-column: 1/-1; | ||
} | ||
@include onDesktop { | ||
grid-column: 1/-10; | ||
} | ||
|
||
&__close { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(../../../img/icon/Close.png); | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
&__count { | ||
display: flex; | ||
align-items: center; | ||
&--button { | ||
background-color: #fff; | ||
display: block; | ||
width: 32px; | ||
height: 32px; | ||
border: 1px solid $elemnts-color; | ||
border-radius: 32px; | ||
padding: 8px; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
&-minus { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
&-plus { | ||
width: 16px; | ||
height: 16px; | ||
} | ||
} | ||
&__number { | ||
margin-left: 8px; | ||
margin-right: 8px; | ||
font-size: 14px; | ||
font-weight: 600; | ||
line-height: 21px; | ||
} | ||
} | ||
&__name { | ||
width: 128px; | ||
} | ||
&__price { | ||
color: $primary-color; | ||
font-weight: 800; | ||
font-size: 22px; | ||
line-height: 30px; | ||
} | ||
&:not(:last-child) { | ||
margin-bottom: 16px; | ||
} | ||
} | ||
.block { | ||
&__information { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
margin-bottom: 16px; | ||
} | ||
&__price { | ||
display: flex; | ||
justify-content: space-between; | ||
align-items: center; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { Cart } from '../../../type/Cart'; | ||
import minus from '../../../img/icon/Minus.png'; | ||
import plus from '../../../img/icon/Plus.png'; | ||
import './CartItem.scss'; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-empty-object-type | ||
type Props = { | ||
cart: Cart; | ||
}; | ||
|
||
export const CartItem: React.FC<Props> = ({ cart }) => { | ||
return ( | ||
<div className="cartItem"> | ||
<div className="block__information"> | ||
<div className="cartItem__close"></div> | ||
<img src={cart.img} /> | ||
<div className="cartItem__name">{cart.title}</div> | ||
</div> | ||
<div className="block__price"> | ||
<div className="cartItem__count"> | ||
<button className="cartItem__count--button"> | ||
<img src={minus} className="cartItem__count--button-minus" /> | ||
</button> | ||
<div className="cartItem__count__number">{cart.count}</div> | ||
<button className="cartItem__count--button"> | ||
<img src={plus} className="cartItem__count--button-plus" /> | ||
</button> | ||
</div> | ||
<div className="cartItem__price">${cart.price}</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
.cart { | ||
@include mainContentGrid; | ||
|
||
&__rout { | ||
display: flex; | ||
margin-top: 24px; | ||
margin-bottom: 16px; | ||
&__img { | ||
width: 16px; | ||
height: 16px; | ||
background-image: url(../../img/arrowActive/ArrowLeft.png); | ||
background-size: cover; | ||
background-repeat: no-repeat; | ||
background-position: center; | ||
} | ||
&__name { | ||
font-weight: 700; | ||
color: #89939a; | ||
font-size: 12px; | ||
line-height: 15px; | ||
margin-left: 4px; | ||
} | ||
} | ||
&__title { | ||
font-weight: 800; | ||
font-size: 32px; | ||
line-height: 41px; | ||
letter-spacing: -1%; | ||
margin-bottom: 32px; | ||
@include onTablet { | ||
font-size: 48px; | ||
line-height: 56px; | ||
} | ||
} | ||
&__items { | ||
@include mainPageGrid; | ||
grid-column: 1/-1; | ||
} | ||
&__total-count { | ||
border: 1px solid $elemnts-color; | ||
border-radius: 16px; | ||
padding: 24px; | ||
margin-bottom: 56px; | ||
grid-column: 1/-1; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
@include onDesktop { | ||
grid-column: 17/-1; | ||
grid-row: 1; | ||
} | ||
&__price { | ||
color: #0f0f11; | ||
font-weight: 800; | ||
font-size: 32px; | ||
letter-spacing: -1%; | ||
} | ||
&__text { | ||
color: $secondary-color; | ||
font-weight: 600; | ||
font-size: 14px; | ||
line-height: 21px; | ||
} | ||
&__line { | ||
height: 1px; | ||
width: 100%; | ||
background-color: $elemnts-color; | ||
margin: 16px 0; | ||
@include onDesktop { | ||
margin: 25px 0 24px 0; | ||
} | ||
} | ||
&__button-checkout { | ||
width: 100%; | ||
height: 48px; | ||
} | ||
} | ||
} |
Oops, something went wrong.