Basic Clip list

This commit is contained in:
Romain CLEMENT 2023-04-03 09:58:33 +02:00
parent df3a136172
commit 6fd6c609fc
2 changed files with 35 additions and 0 deletions

15
clip/ClipElement.tsx Normal file
View File

@ -0,0 +1,15 @@
import React from 'react';
import { View, Text } from 'react-native';
export default class ClipElement extends React.Component<any, any> {
constructor(props: any) {
super(props);
}
render(): JSX.Element {
return <View>
<Text>{this.props.title}</Text>
</View>;
}
}

20
clip/ClipList.tsx Normal file
View File

@ -0,0 +1,20 @@
import React from 'react';
import { ScrollView } from 'react-native';
import ClipElement from './ClipElement';
export default class ClipList extends React.Component<any, any> {
constructor(props: any) {
super(props);
}
createClipElement(title: string): JSX.Element {
return <ClipElement title={title} />;
}
render(): JSX.Element {
return <ScrollView>
{this.props.clips.map((entry: any) => this.createClipElement(entry.title))}
</ScrollView>;
}
}