Renames FramedSegment to Segment

This commit is contained in:
mashazyu
2020-03-23 15:02:08 +01:00
committed by Sofiya Tepikin
parent 6fb1c7cce9
commit 78d4077fb4
8 changed files with 45 additions and 46 deletions
+40
View File
@@ -0,0 +1,40 @@
import React from 'react'
import PropTypes from 'prop-types'
import { StyleSheet, View } from 'react-native'
import AppText from './app-text'
import { Containers, Typography } from '../../styles/redesign'
const Segment = ({ children, last, title }) => {
const containerStyle = last ? styles.containerLast : styles.container
return (
<View style={containerStyle}>
{title && <AppText style={styles.title}>{title}</AppText>}
{children}
</View>
)
}
Segment.propTypes = {
children: PropTypes.node,
last: PropTypes.bool,
title: PropTypes.string
}
const styles = StyleSheet.create({
container: {
...Containers.segmentContainer,
...Containers.bottomBorder
},
containerLast: {
...Containers.segmentContainer,
...Containers.marginBottom
},
title: {
...Typography.titleSmall
}
})
export default Segment