Redesign chart

This commit is contained in:
Maria Zadnepryanets
2020-08-01 11:37:20 +00:00
committed by Sofiya Tepikin
parent 550b1e6314
commit ef16cfd041
27 changed files with 718 additions and 575 deletions
+23 -9
View File
@@ -1,26 +1,36 @@
import React from 'react'
import PropTypes from 'prop-types'
import { ScrollView, StyleSheet } from 'react-native'
import { ScrollView, StyleSheet, View } from 'react-native'
import AppText from '../common/app-text'
import { Colors, Typography } from '../../styles/redesign'
const AppPage = ({ children, contentContainerStyle, title }) => {
const AppPage = ({
children,
contentContainerStyle,
scrollViewStyle,
title,
...props
}) => {
return(
<ScrollView
style={styles.container}
contentContainerStyle={contentContainerStyle}
>
{title && <AppText style={styles.title}>{title}</AppText>}
{children}
</ScrollView>
<View style={styles.container}>
<ScrollView
contentContainerStyle={[styles.scrollView, contentContainerStyle]}
style={scrollViewStyle}
{...props}
>
{title && <AppText style={styles.title}>{title}</AppText>}
{children}
</ScrollView>
</View>
)
}
AppPage.propTypes = {
children: PropTypes.node,
contentContainerStyle: PropTypes.object,
scrollViewStyle: PropTypes.object,
title: PropTypes.string
}
@@ -29,6 +39,10 @@ const styles = StyleSheet.create({
backgroundColor: Colors.tourquiseLight,
flex: 1
},
scrollView: {
backgroundColor: Colors.tourquiseLight,
flexGrow: 1
},
title: {
...Typography.title
}