-
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 #47 from Central-MakeUs/feat-44
feat : 홈페이지 UI 추가
- Loading branch information
Showing
16 changed files
with
456 additions
and
9 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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { color, typography } from '../../../ui'; | ||
|
||
export const container = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 4, | ||
alignItems: 'center', | ||
}); | ||
|
||
export const description = style([ | ||
typography('body_5_12_r'), | ||
{ | ||
color: color('black'), | ||
}, | ||
]); |
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,18 @@ | ||
import { ElementType } from 'react'; | ||
import * as styles from './recommend-category.css'; | ||
|
||
type RecommendCategoryProps = { | ||
Icon: ElementType; | ||
name: string; | ||
}; | ||
|
||
export const RecommendCategory = (props: RecommendCategoryProps) => { | ||
const { Icon, name } = props; | ||
|
||
return ( | ||
<div className={styles.container}> | ||
<Icon /> | ||
<p className={styles.description}>{name}</p> | ||
</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,52 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { color, typography } from '../../../ui'; | ||
|
||
export const container = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 18, | ||
overflow: 'hidden', | ||
}); | ||
|
||
export const header = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 2, | ||
padding: '5px 0 8px 0', | ||
}); | ||
|
||
export const headerTitleContainer = style({ | ||
display: 'flex', | ||
justifyContent: 'space-between', | ||
alignItems: 'center', | ||
}); | ||
|
||
export const gallery = style({ | ||
display: 'flex', | ||
gap: 18, | ||
overflowX: 'auto', | ||
width: 'calc(100dvw - 40px)', | ||
'@media': { | ||
'screen and (min-width: 440px)': { | ||
width: 400, | ||
}, | ||
}, | ||
whiteSpace: 'nowrap', | ||
'::-webkit-scrollbar': { | ||
display: 'none', | ||
}, | ||
}); | ||
|
||
export const description = style([ | ||
typography('body_3_14_r'), | ||
{ | ||
color: color('grey600'), | ||
}, | ||
]); | ||
|
||
export const title = style([ | ||
typography('title_2_20_b'), | ||
{ | ||
color: color('grey800'), | ||
}, | ||
]); |
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,33 @@ | ||
import { ButtonText } from '../../../ui/button-text'; | ||
import { Card } from '../../../ui/card/card'; | ||
import { MOCK_PRODUCT_LIST } from '../mock-product'; | ||
import * as styles from './recommend-product.css'; | ||
|
||
type RecommendProductGalleryProps = { | ||
description: string; | ||
title: string; | ||
}; | ||
|
||
//TODO 추후 데이터 패칭 및 로딩 처리 필요 | ||
export const RecommendProductGallery = ( | ||
props: RecommendProductGalleryProps, | ||
) => { | ||
const { description, title } = props; | ||
|
||
return ( | ||
<section className={styles.container}> | ||
<header className={styles.header}> | ||
<p className={styles.description}>{description}</p> | ||
<div className={styles.headerTitleContainer}> | ||
<h4 className={styles.title}>{title}</h4> | ||
<ButtonText icon>더보기</ButtonText> | ||
</div> | ||
</header> | ||
<div className={styles.gallery}> | ||
{MOCK_PRODUCT_LIST.map((mockProduct) => ( | ||
<Card key={mockProduct.name} {...mockProduct} /> | ||
))} | ||
</div> | ||
</section> | ||
); | ||
}; |
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,8 @@ | ||
export const MOCK_PRODUCT = { | ||
imageUrl: 'https://picsum.photos/200/300', | ||
company: '종근당건강 종근당건강 종근당건강', | ||
name: '이뮨베라 이뮨베라 이뮨베라 이뮨베라 이뮨베라 이뮨베라 이뮨베라 ', | ||
price: 77000, | ||
}; | ||
|
||
export const MOCK_PRODUCT_LIST = Array.from({ length: 10 }, () => MOCK_PRODUCT); |
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,27 @@ | ||
import { ElementType } from 'react'; | ||
import { | ||
IcAnemia_S, | ||
IcBloodcirculation_S, | ||
IcBloodfat_S, | ||
IcBloodpressure_S, | ||
IcBloodsugar_S, | ||
IcBone_S, | ||
IcImmunity_S, | ||
IcTooth_S, | ||
} from '../../assets'; | ||
|
||
type RecommendCategory = { | ||
icon: ElementType; | ||
name: string; | ||
}; | ||
|
||
export const RECOMMEND_CATEGORY_LIST: RecommendCategory[] = [ | ||
{ icon: IcImmunity_S, name: '면역 기능' }, | ||
{ icon: IcBloodpressure_S, name: '혈압' }, | ||
{ icon: IcBloodsugar_S, name: '혈당' }, | ||
{ icon: IcBloodfat_S, name: '헐중 지방' }, | ||
{ icon: IcBloodcirculation_S, name: '혈액 순환' }, | ||
{ icon: IcAnemia_S, name: '빈혈' }, | ||
{ icon: IcBone_S, name: '뼈 건강' }, | ||
{ icon: IcTooth_S, name: '치아&잇몸' }, | ||
]; |
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 |
---|---|---|
@@ -1,4 +1,101 @@ | ||
import { style } from '@vanilla-extract/css'; | ||
import { color } from '../../ui'; | ||
import { color, typography } from '../../ui'; | ||
|
||
export const home = style({ backgroundColor: color('blue100') }); | ||
|
||
export const mainContainer = style({ | ||
padding: '60px 20px 86px 20px', | ||
}); | ||
|
||
export const contentContainer = style({ | ||
display: 'flex', | ||
gap: 18, | ||
flexDirection: 'column', | ||
}); | ||
|
||
export const mainSearchContainer = style([ | ||
contentContainer, | ||
{ | ||
alignItems: 'center', | ||
}, | ||
]); | ||
|
||
export const recommendSearchTitle = style([ | ||
typography('head_1_18_sb'), | ||
{ | ||
color: color('grey900'), | ||
}, | ||
]); | ||
|
||
export const recommendSearchDescription = style([ | ||
typography('body_5_12_r'), | ||
{ | ||
color: color('grey500'), | ||
}, | ||
]); | ||
|
||
export const recommendSearchKeywordContainer = style([ | ||
contentContainer, | ||
{ | ||
gap: 15, | ||
}, | ||
]); | ||
|
||
export const bottomSheetContainer = style({ | ||
backgroundColor: color('white'), | ||
borderRadius: '20px 20px 0px 0px', | ||
boxShadow: '0 -1.01px 12.3px 5px rgba(148, 161, 201, 0.3)', | ||
}); | ||
|
||
export const bottomSheetHealthCategoryContainer = style({ | ||
padding: '16px 20px', | ||
}); | ||
|
||
export const viewAllButton = style({ | ||
width: '100%', | ||
display: 'flex', | ||
justifyContent: 'center', | ||
alignItems: 'center', | ||
padding: '8px 0', | ||
borderTop: `1px solid ${color('grey100')}`, | ||
cursor: 'pointer', | ||
}); | ||
|
||
export const separator = style({ | ||
height: 10, | ||
backgroundColor: color('grey100'), | ||
}); | ||
|
||
export const bottomSheetDescription = style([ | ||
typography('body_3_14_r'), | ||
{ | ||
color: color('grey600'), | ||
}, | ||
]); | ||
|
||
export const recommendCategoryContainer = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 14, | ||
}); | ||
|
||
export const recommendCategoryTitle = style([ | ||
typography('head_1_18_sb'), | ||
{ | ||
color: color('grey800'), | ||
padding: '5px 0', | ||
}, | ||
]); | ||
|
||
export const recommendCategoryGallery = style({ | ||
display: 'grid', | ||
gridTemplateColumns: 'repeat(4, 1fr)', | ||
gap: '18px 32px', | ||
}); | ||
|
||
export const recommendProductContainer = style({ | ||
display: 'flex', | ||
flexDirection: 'column', | ||
gap: 50, | ||
padding: '30px 20px 36px 20px', | ||
}); |
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
Oops, something went wrong.