Basic Clip list
This commit is contained in:
parent
df3a136172
commit
6fd6c609fc
15
clip/ClipElement.tsx
Normal file
15
clip/ClipElement.tsx
Normal 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
20
clip/ClipList.tsx
Normal 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>;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user