Introduces AppText, Link and FramedSegment redesign

This commit is contained in:
mashazyu
2020-03-23 09:39:55 +01:00
committed by Sofiya Tepikin
parent 1fc7bc17b9
commit 8c1c72ccc9
8 changed files with 116 additions and 21 deletions
+12 -3
View File
@@ -1,14 +1,16 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Text } from 'react-native'
import styles from "../../styles"
import { StyleSheet, Text } from 'react-native'
import Link from './link'
import { Colors, Typography } from '../../styles/redesign'
export default function AppText({ children, onPress, numberOfLines, style}) {
// we parse for links in case the text contains any
return (
<Link>
<Text style={[styles.appText, style]}
<Text style={[styles.text, style]}
onPress={onPress}
numberOfLines={numberOfLines}
>
@@ -24,3 +26,10 @@ AppText.propTypes = {
numberOfLines: PropTypes.number,
style: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
}
const styles = StyleSheet.create({
text: {
color: Colors.grey,
...Typography.mainText
}
})