chart-view, styles and tests

This commit is contained in:
Loewy
2024-01-15 13:02:51 -08:00
parent 4e3a93f126
commit f14ba0e97f
4 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import { StyleSheet } from 'react-native';
import { colors, shadows } from '../../styles';
export const graphStyles = StyleSheet.create({
container: {
backgroundColor: colors.panelWhite,
borderColor: 'black',
borderRadius: 5,
marginVertical: 10,
marginHorizontal: 15,
paddingTop: 15,
paddingHorizontal: 15,
...shadows.standard
},
});

View File

@@ -0,0 +1,17 @@
import React from 'react';
import { StyleProp, View, ViewStyle } from 'react-native';
import { graphStyles } from './chart-styles';
interface ChartViewProps {
style?: StyleProp<ViewStyle>;
children: React.ReactNode;
testID?: string;
}
// ChartView functional component with margin props
const ChartView: React.FC<ChartViewProps> = ({ children, style, testID }) => {
return <View style={[graphStyles.container, style]} testID={testID} >{children}</View>;
};
export default ChartView;