-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.tsx
More file actions
62 lines (58 loc) · 1.32 KB
/
index.tsx
File metadata and controls
62 lines (58 loc) · 1.32 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
50
51
52
53
54
55
56
57
58
59
60
61
62
import React, { memo } from 'react'
import { View, StyleSheet } from 'react-native'
import { Txt } from '../Txt'
import { Avatar } from '../Avatar'
import { CardInfo } from '../CardInfo'
import { CardBorder } from '../CardBorder'
import { Star } from '../Star'
import { Space } from '../Space'
import { ButtonRate } from '../ButtonRate'
const styles = StyleSheet.create({
starStyle: {
position: 'absolute',
top: 10,
right: 10,
justifyContent: 'flex-end'
}
})
interface CardResumeT {
obj?: {
title: string
avatar: string
rate: number
cost: number
}
obj2?: {
position: string
language: string
stack: string
experience: string
}
bool?: boolean
}
const CardResume = memo<CardResumeT>(({ obj, obj2, bool = false }) => {
const { title, rate, avatar } = obj
const { starStyle } = styles
const user = (
<>
<View style={starStyle}>
<Star star={bool} />
</View>
<Avatar uri={avatar} size="large" />
<Space height={10} />
<Txt h1 title={title} textStyle={{ textAlign: 'center' }} />
<Space height={20} />
<ButtonRate title={rate} />
<Space height={20} />
</>
)
return (
<>
<CardBorder>
{bool && user}
<CardInfo obj={obj2} bool={false} />
</CardBorder>
</>
)
})
export { CardResume }