-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleTasks.js
More file actions
36 lines (32 loc) · 975 Bytes
/
ModuleTasks.js
File metadata and controls
36 lines (32 loc) · 975 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import React from 'react';
import { Dimensions, View, Text, StyleSheet } from 'react-native';
const screenWidth = Dimensions.get('window').width;
const RoundedRectangles = ({ rectangles }) => {
return (
<View style={styles.container}>
{rectangles.map((rectangle, index) => (
<View key={index} style={[styles.rectangle, { borderRadius: rectangle.radius, width: screenWidth * 0.9, height: screenWidth * 0.2 }]}>
<Text style={styles.text}>{rectangle.text}</Text>
</View>
))}
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
},
rectangle: {
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#ddd',
marginTop: 15,
},
text: {
fontSize: 20,
color: '#333',
},
});
export default RoundedRectangles;