-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.tsx
More file actions
49 lines (45 loc) · 1.33 KB
/
index.tsx
File metadata and controls
49 lines (45 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import React, { memo } from 'react'
import { StyleSheet, View, TouchableOpacity } from 'react-native'
import { ButtonDeveloperSub } from '../ButtonDeveloperSub'
import { Txt } from '../Txt'
import { CardBorder } from '../CardBorder'
import { ButtonComments } from '../ButtonComments'
import { Space } from '../Space'
const styles = StyleSheet.create({
container: {
flexDirection: 'row',
justifyContent: 'space-between'
}
})
interface Props {
obj?: {
title: string
description: string
uri: string
name: string
comments: number
rate: number
}
onPress?: () => void
}
const CardIssue = memo<Props>(({ obj, onPress }) => {
const { container } = styles
const { title, description, name, comments, uri, rate } = obj
return (
<>
<CardBorder>
<TouchableOpacity onPress={onPress}>
<Txt h1 title={title} viewStyle={{ marginTop: 25 }} numberOfLines={1} ellipsizeMode="tail" />
<Space height={10} />
<Txt body title={description} numberOfLines={4} ellipsizeMode="tail" />
<Space height={15} />
</TouchableOpacity>
<ButtonComments title={comments} viewStyle={{ paddingLeft: 5 }} />
<View style={container}>
<ButtonDeveloperSub title={name} uri={uri} rate={rate} />
</View>
</CardBorder>
</>
)
})
export { CardIssue }