eletrotupi / tcc/ frontend/app/(tabs)/new/entry.tsx9671ed464961e554cd1fcbecdee8ef718000e49c
2.8 KB | 101 lines Raw
1
import { useState, useEffect } from 'react';
2
import {
3
  Link, router, useLocalSearchParams
4
} from 'expo-router';
5

6
import {
7
  View,
8
  Text,
9
  StyleSheet,
10
  ScrollView
11
} from 'react-native';
12

13
import { SafeAreaView } from 'react-native-safe-area-context';
14
import { ThemedText } from '@/components/misc/themed-text';
15
import { ThemedView } from '@/components/misc/themed-view';
16
import { ScreenLayout } from '@/components/ui/ScreenLayout';
17
import { useAuth } from '@/context/AuthContext';
18
import { Grid, Col, Row, Between, Center } from '@/components/ui/LayoutHelpers';
19
import { Card } from '@/components/ui/Cards';
20
import { Button } from '@/components/ui/Button';
21
import { Input, TextArea } from '@/components/ui/Input';
22
import { Section, SectionHeader } from '@/components/ui/Sections';
23
import { Spacing, Typography, Colors } from '@/constants/theme';
24

25
export default function NewMoodEntry() {
26
  const { user } = useAuth();
27
  // TODO: transform this into a specific mood component
28
  const { initialMood } = useLocalSearchParams();
29

30
  const editComponents = () => {
31
    console.log("Wants to open the components");
32
  }
33

34
  return (
35
    <View>
36
      <ScrollView
37
        scrollEventThrottle={16}>
38
        <View style={styles.container}>
39
          <Center>
40
            <ThemedText style={styles.statusPrefix}>
41
              Como você está se sentindo agora?
42
            </ThemedText>
43

44
            <ThemedText style={styles.statusText}>
45
              Muito Bem
46
            </ThemedText>
47
          </Center>
48

49
          <Card style={styles.resumeCard}>
50
          </Card>
51

52
          <Card style={styles.annotationsCard}>
53
            <TextArea
54
              label="Notas sobre o dia"
55
              type="text"
56
              variant="darkGhost"
57
              onChangeText={(val) => console.log(val)}
58
              minRows={4}
59
              maxRows={6}
60
              placeholder="Escreva uma nota rápida sobre o seu dia até o momento..."
61
            />
62
          </Card>
63

64
          <Section>
65
            <SectionHeader title="Componentes do Humor" info="Editar" />
66
            <Grid gap={4}>
67
              <Card style={{height: 38}} />
68
              <Card style={{height: 38}} />
69
            </Grid>
70

71
            <Button title="Adicionar Componentes"
72
                    onPress={editComponents}
73
                    textStyle={{ fontWeight: 500 }}
74
                    variant="dashed"
75
                    />
76
          </Section>
77
        </View>
78
      </ScrollView>
79
    </View>
80
  );
81
}
82

83
const styles = StyleSheet.create({
84
  container: {
85
    gap: 24,
86
    paddingHorizontal: Spacing.containerPadding,
87
    paddingVertical: Spacing.sectionGap,
88
  },
89
  statusText: {
90
    ...Typography.headlineXg,
91
  },
92
  statusPrefix: {
93
    ...Typography.bodyMd
94
  },
95
  annotationsCard: {
96
    padding: Spacing.cardGap
97
  },
98
  resumeCard: {
99
    height: 361
100
  }
101
});