react-native-demo-library-by-rinkal 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/TaskCard.tsx +3 -3
- package/index.js +1 -4
- package/package.json +2 -5
- package/TaskList.tsx +0 -18
package/TaskCard.tsx
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { View, Text } from 'react-native';
|
|
2
|
-
const TaskCard = ({
|
|
2
|
+
const TaskCard = ({title}: {title: string}) => {
|
|
3
3
|
return (
|
|
4
4
|
<View style={{ padding: 10, borderWidth: 1, borderColor: '#ccc', borderRadius: 5, margin: 5 }}>
|
|
5
|
-
<Text style={{ fontWeight: 'bold', fontSize: 16 }}>{
|
|
6
|
-
<Text style={{ fontSize: 14 }}>{
|
|
5
|
+
<Text style={{ fontWeight: 'bold', fontSize: 16 }}>{title}</Text>
|
|
6
|
+
<Text style={{ fontSize: 14 }}>{title}</Text>
|
|
7
7
|
</View>
|
|
8
8
|
);
|
|
9
9
|
};
|
package/index.js
CHANGED
|
@@ -2,7 +2,4 @@ import TaskCard from "./TaskCard";
|
|
|
2
2
|
export const TaskCardComponent = TaskCard;
|
|
3
3
|
|
|
4
4
|
import TaskDemoCard from "./TaskDemoCard";
|
|
5
|
-
export const TaskDemoCardComponent = TaskDemoCard;
|
|
6
|
-
|
|
7
|
-
import { TaskList } from "./TaskList";
|
|
8
|
-
export const TaskListComponent = TaskList;
|
|
5
|
+
export const TaskDemoCardComponent = TaskDemoCard;
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-demo-library-by-rinkal",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "rinkal",
|
|
7
|
-
"type": "
|
|
7
|
+
"type": "module",
|
|
8
8
|
"main": "index.js",
|
|
9
9
|
"peerDependencies": {
|
|
10
10
|
"react": "19.1.0",
|
|
@@ -12,8 +12,5 @@
|
|
|
12
12
|
},
|
|
13
13
|
"scripts": {
|
|
14
14
|
"test": "echo \"Error: no test specified\" && exit 1"
|
|
15
|
-
},
|
|
16
|
-
"devDependencies": {
|
|
17
|
-
"metro-react-native-babel-preset": "^0.77.0"
|
|
18
15
|
}
|
|
19
16
|
}
|
package/TaskList.tsx
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { View, Text, FlatList } from 'react-native'
|
|
2
|
-
import React from 'react'
|
|
3
|
-
import TaskCard from './TaskCard'
|
|
4
|
-
|
|
5
|
-
export const TaskList = ({list}:{list: {id: string, title: string}[]}) => {
|
|
6
|
-
return (
|
|
7
|
-
<View style={{ padding: 10, borderWidth: 1, borderColor: '#ccc', borderRadius: 5, margin: 5 }}>
|
|
8
|
-
<Text>Task List</Text>
|
|
9
|
-
<FlatList
|
|
10
|
-
data={list}
|
|
11
|
-
keyExtractor={item => item.id}
|
|
12
|
-
renderItem={({item}) => (
|
|
13
|
-
<TaskCard item={item}/>
|
|
14
|
-
)}
|
|
15
|
-
/>
|
|
16
|
-
</View>
|
|
17
|
-
)
|
|
18
|
-
}
|