AppLoading/AppText/AppTextInput/Button/FramedSegment/Link -> ./common

This commit is contained in:
mashazyu
2020-03-22 17:18:28 +01:00
committed by Sofiya Tepikin
parent d3e795a51f
commit 1fc7bc17b9
37 changed files with 46 additions and 46 deletions
+26
View File
@@ -0,0 +1,26 @@
import React from 'react'
import PropTypes from 'prop-types'
import { Text } from 'react-native'
import styles from "../../styles"
import Link from './link'
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]}
onPress={onPress}
numberOfLines={numberOfLines}
>
{children}
</Text>
</Link>
)
}
AppText.propTypes = {
children: PropTypes.node,
onPress: PropTypes.func,
numberOfLines: PropTypes.number,
style: PropTypes.oneOfType([PropTypes.array, PropTypes.object]),
}