File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React , { useState } from 'react'
22import { StyleSheet , View } from 'react-native'
33import { BLACK , WHITE } from './constants'
4- import { Space , Text , CategoryCard } from './components'
4+ import { Space , Text , CardImage } from './components'
55
66const styles = StyleSheet . create ( {
77 container : {
@@ -38,10 +38,7 @@ function Home({ navigation, route }: HomeT) {
3838 < View style = { container } >
3939 < Text title = "CategoryCard" h0 />
4040 < Space height = { 15 } />
41- < CategoryCard
42- title = "New"
43- imageUri = "https://avatars.mds.yandex.net/i?id=a832e7f3d01fa1cb0d468cbb92106605-5233897-images-thumbs& n = 13 "
44- />
41+ < CardImage imageUri = "https://i.ebayimg.com/00/s/NzQzWDczMQ==/z/ooQAAOSwAolakPD5/$_57.JPG?set_id=8800005007" />
4542 </ View >
4643 )
4744}
Original file line number Diff line number Diff line change 1+ import React from 'react'
2+ import { Image , StyleSheet } from 'react-native'
3+
4+ const styles = StyleSheet . create ( {
5+ container : {
6+ width : 130 ,
7+ height : 135 ,
8+ borderRadius : 8
9+ }
10+ } )
11+
12+ interface CardImageT {
13+ imageUri : string
14+ }
15+
16+ function CardImage ( { imageUri } : CardImageT ) {
17+ const { container } = styles
18+ return < Image source = { { uri : imageUri } } style = { container } />
19+ }
20+
21+ export { CardImage }
Original file line number Diff line number Diff line change @@ -12,4 +12,5 @@ export * from './Selector'
1212export * from './PopUp'
1313export * from './CardOrder'
1414export * from './Filter'
15- export * from './CategoryCard'
15+ export * from './CategoryCard'
16+ export * from './CardImage'
You can’t perform that action at this time.
0 commit comments