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
+29
View File
@@ -0,0 +1,29 @@
import React from 'react'
import PropTypes from 'prop-types'
import { View } from 'react-native'
import AppText from './app-text'
import styles from '../../styles'
const FramedSegment = ({ children, last, style, title }) => {
const viewStyle = [styles.framedSegment, style]
if (last) viewStyle.push(styles.framedSegmentLast)
return (
<View style={[viewStyle]}>
{title && <AppText style={styles.framedSegmentTitle}>{title}</AppText>}
{children}
</View>
)
}
FramedSegment.propTypes = {
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]),
last: PropTypes.bool,
style: PropTypes.object,
title: PropTypes.string
}
export default FramedSegment