Revize b225ffee
Přidáno uživatelem Fantič před téměř 2 roky(ů)
src/components/notes/NotesListView.tsx | ||
---|---|---|
1 |
import { Center, VStack, Box, Text, HStack } from "native-base"; |
|
1 |
import { Center, VStack, Box, Text, HStack, ScrollView } from "native-base";
|
|
2 | 2 |
import { Note } from "../../types/note"; |
3 | 3 |
import NoteView from "./NoteView"; |
4 | 4 |
|
5 |
const NotesListView = (props: { notes: Note[] }) => {
|
|
5 |
const NotesListView = (props: { notes: Note[], handleReply : any, handleDelete : any, handleEdit : any, setConfirmDialog: any}) => {
|
|
6 | 6 |
const notes = props.notes; |
7 | 7 |
return ( |
8 |
<VStack>
|
|
8 |
<ScrollView>
|
|
9 | 9 |
{ |
10 | 10 |
notes && notes.length > 0 ? ( |
11 | 11 |
<VStack> |
12 | 12 |
{notes.map((note, index) => ( |
13 |
<NoteView key={index} note={note}/> |
|
13 |
<NoteView key={index} note={note} handleReply={props.handleReply} handleDelete={props.handleDelete} handleEdit={props.handleEdit} setConfirmDialog={props.setConfirmDialog}/>
|
|
14 | 14 |
))} |
15 | 15 |
</VStack> |
16 | 16 |
) : ( |
17 | 17 |
<Text>There are no notes.</Text> |
18 | 18 |
) |
19 | 19 |
} |
20 |
</VStack>
|
|
20 |
</ScrollView>
|
|
21 | 21 |
); |
22 | 22 |
} |
23 | 23 |
|
Také k dispozici: Unified diff
re #10569: NotesView: interface implementation