forked from sdp-tech/UPCY_Mobile
-
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.
sdp-tech#11 feat: add product & service item
- Loading branch information
Showing
10 changed files
with
119 additions
and
19 deletions.
There are no files selected for viewing
File renamed without changes
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
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,26 @@ | ||
import styled from 'styled-components/native'; | ||
import { PURPLE3 } from '../styles/GlobalColor'; | ||
import { Caption11M } from '../styles/GlobalText'; | ||
|
||
interface ThumbnailHashtagProps { | ||
value: string; | ||
} | ||
|
||
const ThumbnailHashtag = ({ value }: ThumbnailHashtagProps) => { | ||
return ( | ||
<Container> | ||
<Caption11M>{value}</Caption11M> | ||
</Container> | ||
) | ||
} | ||
|
||
const Container = styled.View` | ||
display: flex; | ||
padding: 4px 8px; | ||
justify-content: center; | ||
align-items: center; | ||
border-radius: 4px; | ||
background: ${PURPLE3}; | ||
` | ||
|
||
export default ThumbnailHashtag; |
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,39 @@ | ||
import { useState } from 'react'; | ||
import { View, TouchableOpacity, ImageBackground } from 'react-native'; | ||
import styled from 'styled-components/native'; | ||
|
||
import HeartButton from '../../../common/HeartButton'; | ||
import { Body14R, Body16M } from '../../../styles/GlobalText'; | ||
import ThumbnailHashtag from '../../../common/ThumbnailHashtag'; | ||
|
||
interface ProductItemProps { | ||
onPress: () => void; | ||
} | ||
|
||
const ProductItem = ({ onPress }: ProductItemProps) => { | ||
const [like, setLike] = useState<boolean>(false); | ||
return ( | ||
<TouchableOpacity style={{paddingHorizontal: 20, paddingVertical: 5, width: '50%'}} onPress={onPress}> | ||
<ImageBackground | ||
style={{width: '100%', height: 170, justifyContent: 'flex-end', alignItems: 'flex-end'}} | ||
source={{uri: 'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSuOFPZloY83xIUAOR_4ADrZzBhXt7UZH7qJA&usqp=CAU'}} | ||
> | ||
<HeartButton like={like} onPress={() => setLike(!like)} /> | ||
</ImageBackground> | ||
<Body14R>청바지 에코백</Body14R> | ||
<TextContainer> | ||
<Body16M>25,000</Body16M> | ||
<ThumbnailHashtag value={'빈티지'} /> | ||
</TextContainer> | ||
</TouchableOpacity> | ||
) | ||
} | ||
|
||
const TextContainer = styled.View` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
padding-vertical: 5px; | ||
` | ||
|
||
export default ProductItem; |
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,39 @@ | ||
import { useState } from 'react'; | ||
import { View, TouchableOpacity, ImageBackground } from 'react-native'; | ||
import styled from 'styled-components/native'; | ||
|
||
import HeartButton from '../../../common/HeartButton'; | ||
import { Body16B, Caption12M, Subtitle16B } from '../../../styles/GlobalText'; | ||
import { BLACK2 } from '../../../styles/GlobalColor'; | ||
|
||
interface ServiceItemProps { | ||
onPress: () => void; | ||
} | ||
|
||
const ServiceItem = ({ onPress }: ServiceItemProps) => { | ||
const [like, setLike] = useState<boolean>(false); | ||
return ( | ||
<TouchableOpacity style={{paddingHorizontal: 20, paddingVertical: 5}} onPress={onPress}> | ||
<ImageBackground | ||
style={{width: '100%', height: 180, justifyContent: 'flex-end', alignItems: 'flex-end'}} | ||
source={{uri: 'https://image.made-in-china.com/2f0j00efRbSJMtHgqG/Denim-Bag-Youth-Fashion-Casual-Small-Mini-Square-Ladies-Shoulder-Bag-Women-Wash-Bags.webp'}} | ||
> | ||
<HeartButton like={like} onPress={() => setLike(!like)} /> | ||
</ImageBackground> | ||
<TitleContainer> | ||
<Subtitle16B>청바지 에코백 서비스</Subtitle16B> | ||
<Body16B style={{color: BLACK2}}>20000원 ~</Body16B> | ||
</TitleContainer> | ||
<Caption12M style={{color: BLACK2}}>안입는 청바지를 활용한 나만의 에코백! 아주 좋은 에코백 환경에도 좋고 나에게도 좋고 어쩌구저쩌구한 에코백입니다 최고임 짱짱</Caption12M> | ||
</TouchableOpacity> | ||
) | ||
} | ||
|
||
const TitleContainer = styled.View` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: space-between; | ||
padding-vertical: 5px; | ||
` | ||
|
||
export default ServiceItem; |
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,6 @@ | ||
export const PURPLE = '#612FEF'; | ||
export const PURPLE2 = '#CEBFFA'; | ||
export const PURPLE3 = '#E7E0FD'; | ||
export const GREEN = '#DBFC72'; | ||
export const BLACK = '#222222'; | ||
export const BLACK2 = '#929292'; |