-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
417f694
commit 2127560
Showing
33 changed files
with
803 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import FavoriteButton from '../../../core/ui/buttons/FavoriteButton/FavoriteButton'; | ||
import ImageCard from '../../../core/ui/cards/ImageCard/ImageCard'; | ||
import HorizontalLine from '../../../core/ui/lines/HorizontalLine/HorizontalLine'; | ||
import TagList from '../../../core/ui/tags/TagList/TagList'; | ||
import styles from './ItemInfo.module.scss'; | ||
|
||
function ItemInfo({ | ||
itemImgSrc = '', | ||
itemTitle = '', | ||
itemPrice = 0, | ||
itemDesc = '', | ||
itemTags = [], | ||
itemFavoriteCount = 0, | ||
}) { | ||
return ( | ||
<> | ||
<div className={styles['item-info']}> | ||
<div className={styles['item-info__img']}> | ||
<ImageCard | ||
imageSrc={itemImgSrc} | ||
ImgDeafault={ | ||
'https://static.remove.bg/sample-gallery/graphics/bird-thumbnail.jpg' | ||
} | ||
isRoundEdged={true} | ||
/> | ||
</div> | ||
<div className={styles['item-info__content']}> | ||
<div> | ||
<div> | ||
<div> | ||
<p className={styles['item-info__title']}>{itemTitle}</p> | ||
</div> | ||
<div> | ||
<p className={styles['item-info__price']}>{`${itemPrice}원`}</p> | ||
</div> | ||
</div> | ||
<HorizontalLine /> | ||
<div> | ||
<div> | ||
<p className={styles['item-info__content-title']}> | ||
{'상품 소개'} | ||
</p> | ||
</div> | ||
<div> | ||
<p className={styles['item-info__desc-content']}>{itemDesc}</p> | ||
</div> | ||
<div className={styles['item-info__content-title']}> | ||
{'상품 태그'} | ||
</div> | ||
<div> | ||
<TagList tags={itemTags} isSharpVisible={true} /> | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
<div> | ||
<FavoriteButton initCount={itemFavoriteCount} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</> | ||
); | ||
} | ||
|
||
export default ItemInfo; |
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,53 @@ | ||
@import '../../../styles/global.css'; | ||
@import '../../../styles/global.scss'; | ||
|
||
.item-info { | ||
display: flex; | ||
margin: 0 0 32px; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
|
||
&__img { | ||
width: 486px; | ||
height: 486px; | ||
} | ||
|
||
&__content { | ||
display: flex; | ||
margin: 0 0 0 24px; | ||
width: 690px; | ||
height: 486px; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
align-items: flex-start; | ||
} | ||
|
||
&__title { | ||
margin: 0 0 16px; | ||
font-size: 24px; | ||
font-weight: 600; | ||
color: $gray-800; | ||
} | ||
|
||
&__price { | ||
margin: 0 0 16px; | ||
font-size: 40px; | ||
font-weight: 600; | ||
color: $gray-800; | ||
} | ||
|
||
&__content-title { | ||
margin: 16px 0 0; | ||
font-size: 14px; | ||
font-weight: 500; | ||
color: $gray-600; | ||
} | ||
|
||
&__desc-content { | ||
margin: 8px 0 0; | ||
font-size: 16px; | ||
font-weight: 400; | ||
line-height: 140%; | ||
color: $gray-800; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { useState } from 'react'; | ||
import { ReactComponent as IconHeart } from '../../../../assets/images/icons/ic_heart.svg'; | ||
import styles from './FavoriteButton.module.scss'; | ||
|
||
function FavoriteButton({ initCount = 0 }) { | ||
const [count, setCount] = useState(initCount); | ||
|
||
const handleClick = () => { | ||
setCount(count + 1); | ||
}; | ||
|
||
return ( | ||
<> | ||
<button className={styles.btn} onClick={handleClick}> | ||
<div className={styles.btn__wrapper}> | ||
<IconHeart /> | ||
<p className={styles.btn__count}>{count}</p> | ||
</div> | ||
</button> | ||
</> | ||
); | ||
} | ||
|
||
export default FavoriteButton; |
20 changes: 20 additions & 0 deletions
20
src/core/ui/buttons/FavoriteButton/FavoriteButton.module.scss
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,20 @@ | ||
@import '../../../../styles/global.scss'; | ||
|
||
.btn { | ||
border: 1px solid $gray-200; | ||
border-radius: 35px; | ||
|
||
&__wrapper { | ||
display: flex; | ||
flex-direction: row; | ||
align-items: center; | ||
padding: 4px 12px; | ||
} | ||
|
||
&__count { | ||
margin: 0 0 0 5px; | ||
font-size: 16px; | ||
font-weight: 500; | ||
color: $gray-800; | ||
} | ||
} |
Oops, something went wrong.