commit
ae0e61ffc4
BIN
android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
Normal file
BIN
android/app/src/main/assets/fonts/FontAwesome5_Brands.ttf
Normal file
Binary file not shown.
BIN
android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
Normal file
BIN
android/app/src/main/assets/fonts/FontAwesome5_Regular.ttf
Normal file
Binary file not shown.
BIN
android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
Normal file
BIN
android/app/src/main/assets/fonts/FontAwesome5_Solid.ttf
Normal file
Binary file not shown.
23
clip/ClipElement.tsx
Normal file
23
clip/ClipElement.tsx
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import { View, Text, Clipboard } from 'react-native';
|
||||||
|
import IconVector from 'react-native-vector-icons/FontAwesome5';
|
||||||
|
import Toast from 'react-native-simple-toast';
|
||||||
|
|
||||||
|
export default class ClipElement extends React.Component<any, any> {
|
||||||
|
|
||||||
|
constructor(props: any) {
|
||||||
|
super(props);
|
||||||
|
}
|
||||||
|
|
||||||
|
onCopy() {
|
||||||
|
Clipboard.setString(this.props.title);
|
||||||
|
Toast.show('Put "' + this.props.title + '" in clipboard', Toast.SHORT);
|
||||||
|
}
|
||||||
|
|
||||||
|
render(): JSX.Element {
|
||||||
|
return <View style={{flex:1,margin:10,flexDirection:'row',justifyContent:'space-between',alignItems:'center'}}>
|
||||||
|
<Text style={{fontSize:20,}}>{this.props.title}</Text>
|
||||||
|
<IconVector name="clipboard" size={40} onPress={() => this.onCopy()} />
|
||||||
|
</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>;
|
||||||
|
}
|
||||||
|
}
|
@ -14,7 +14,9 @@
|
|||||||
"expo": "^48.0.9",
|
"expo": "^48.0.9",
|
||||||
"expo-cli": "^6.3.2",
|
"expo-cli": "^6.3.2",
|
||||||
"react": "18.2.0",
|
"react": "18.2.0",
|
||||||
"react-native": "0.71.4"
|
"react-native": "0.71.4",
|
||||||
|
"react-native-simple-toast": "^2.0.0",
|
||||||
|
"react-native-vector-icons": "^9.2.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "^7.20.0",
|
"@babel/core": "^7.20.0",
|
||||||
@ -24,6 +26,7 @@
|
|||||||
"@tsconfig/react-native": "^2.0.2",
|
"@tsconfig/react-native": "^2.0.2",
|
||||||
"@types/jest": "^29.2.1",
|
"@types/jest": "^29.2.1",
|
||||||
"@types/react": "^18.0.24",
|
"@types/react": "^18.0.24",
|
||||||
|
"@types/react-native-vector-icons": "^6.4.13",
|
||||||
"@types/react-test-renderer": "^18.0.0",
|
"@types/react-test-renderer": "^18.0.0",
|
||||||
"babel-jest": "^29.2.1",
|
"babel-jest": "^29.2.1",
|
||||||
"eslint": "^8.19.0",
|
"eslint": "^8.19.0",
|
||||||
|
Loading…
Reference in New Issue
Block a user