forked from orodrigogo/nlwcopa-mobile-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
PoolHeader.tsx
45 lines (39 loc) · 985 Bytes
/
PoolHeader.tsx
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
import { Heading, HStack, Text, VStack } from 'native-base';
import { PoolPros } from './PoolCard';
import { Participants } from './Participants';
interface Props {
data: PoolPros;
}
export function PoolHeader({ data }: Props) {
return (
<HStack
w="full"
h={20}
bgColor="transparent"
borderBottomWidth={1}
borderBottomColor="gray.600"
justifyContent="space-between"
alignItems="center"
mb={3}
p={4}
>
<VStack>
<Heading color="white" fontSize="md" fontFamily="heading">
{data.title}
</Heading>
<HStack>
<Text color="gray.200" fontSize="xs" mr={1}>
Código:
</Text>
<Text color="gray.200" fontSize="xs" fontFamily="heading">
{data.code}
</Text>
</HStack>
</VStack>
<Participants
count={data._count?.participants}
participants={data.participants}
/>
</HStack>
);
}