metrics added also
This commit is contained in:
42
src/components/MetricCard.js
Normal file
42
src/components/MetricCard.js
Normal file
@@ -0,0 +1,42 @@
|
||||
import React from 'react';
|
||||
import { View, Text, StyleSheet } from 'react-native';
|
||||
import { COLORS } from '../constants/colors';
|
||||
|
||||
const MetricCard = ({ label, value }) => {
|
||||
return (
|
||||
<View style={styles.card}>
|
||||
<Text style={styles.value}>{value}</Text>
|
||||
<Text style={styles.label}>{label}</Text>
|
||||
</View>
|
||||
);
|
||||
};
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
card: {
|
||||
flex: 1,
|
||||
backgroundColor: COLORS.white,
|
||||
borderRadius: 12,
|
||||
alignItems: 'center',
|
||||
justifyContent: 'center',
|
||||
paddingVertical: 16,
|
||||
marginHorizontal: 4,
|
||||
shadowColor: COLORS.gray[300],
|
||||
shadowOffset: { width: 0, height: 2 },
|
||||
shadowOpacity: 0.1,
|
||||
shadowRadius: 4,
|
||||
elevation: 3,
|
||||
},
|
||||
value: {
|
||||
fontSize: 20,
|
||||
fontWeight: 'bold',
|
||||
color: COLORS.primary,
|
||||
},
|
||||
label: {
|
||||
fontSize: 12,
|
||||
color: COLORS.textSecondary,
|
||||
marginTop: 4,
|
||||
textAlign: 'center',
|
||||
},
|
||||
});
|
||||
|
||||
export default MetricCard;
|
||||
Reference in New Issue
Block a user