forked from expo/react-conf-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathActivityCard.tsx
46 lines (40 loc) · 1.2 KB
/
ActivityCard.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
46
import { StyleSheet, View } from "react-native";
import { ThemedText, ThemedView } from "./Themed";
import { useReactConfStore } from "@/store/reactConfStore";
import { theme } from "@/theme";
import { Session } from "@/types";
import { formatSessionTime } from "@/utils/formatDate";
type Props = {
session: Session;
};
export function ActivityCard({ session }: Props) {
const shouldUseLocalTz = useReactConfStore((state) => state.shouldUseLocalTz);
return (
<ThemedView style={styles.container}>
<ThemedText fontSize={16} fontWeight="medium">
{formatSessionTime(session, shouldUseLocalTz)}
</ThemedText>
<View style={styles.row}>
<ThemedText fontSize={20} fontWeight="bold">
{session.title}
</ThemedText>
<ThemedText fontSize={14} fontWeight="light">
{session.room}
</ThemedText>
</View>
</ThemedView>
);
}
const styles = StyleSheet.create({
container: {
marginHorizontal: theme.space16,
marginBottom: theme.space16,
paddingHorizontal: theme.space12,
paddingVertical: theme.space8,
borderRadius: theme.borderRadius10,
},
row: {
flexDirection: "row",
justifyContent: "space-between",
},
});