Add AppHelp component
This commit is contained in:
@@ -0,0 +1,33 @@
|
|||||||
|
import React from 'react'
|
||||||
|
import PropTypes from 'prop-types'
|
||||||
|
import { StyleSheet, View } from 'react-native'
|
||||||
|
|
||||||
|
import AppText from '../common/app-text'
|
||||||
|
|
||||||
|
import { Containers, Spacing, Typography } from '../../styles'
|
||||||
|
|
||||||
|
const AppHelp = ({ text }) => (
|
||||||
|
<View style={styles.container}>
|
||||||
|
<AppText style={styles.accentPurple}>*</AppText>
|
||||||
|
<AppText>{text}</AppText>
|
||||||
|
</View>
|
||||||
|
)
|
||||||
|
|
||||||
|
AppHelp.propTypes = {
|
||||||
|
onClose: PropTypes.func.isRequired,
|
||||||
|
text: PropTypes.string.isRequired,
|
||||||
|
}
|
||||||
|
|
||||||
|
const styles = StyleSheet.create({
|
||||||
|
accentPurple: {
|
||||||
|
...Typography.accentPurple,
|
||||||
|
alignSelf: 'flex-start',
|
||||||
|
paddingRight: Spacing.base,
|
||||||
|
},
|
||||||
|
container: {
|
||||||
|
...Containers.rowContainer,
|
||||||
|
padding: Spacing.base,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
export default AppHelp
|
||||||
+18
-14
@@ -23,7 +23,7 @@ export const sizes = {
|
|||||||
const accentText = {
|
const accentText = {
|
||||||
fontFamily: fonts.bold,
|
fontFamily: fonts.bold,
|
||||||
textAlignVertical: 'center',
|
textAlignVertical: 'center',
|
||||||
textTransform: 'uppercase'
|
textTransform: 'uppercase',
|
||||||
}
|
}
|
||||||
|
|
||||||
const accentTextBig = {
|
const accentTextBig = {
|
||||||
@@ -43,47 +43,51 @@ const accentTextHuge = {
|
|||||||
|
|
||||||
const accentTextSmall = {
|
const accentTextSmall = {
|
||||||
...accentText,
|
...accentText,
|
||||||
fontSize: sizes.small
|
fontSize: sizes.small,
|
||||||
}
|
}
|
||||||
|
|
||||||
const title = {
|
const title = {
|
||||||
color: Colors.purple,
|
color: Colors.purple,
|
||||||
marginVertical: Spacing.large
|
marginVertical: Spacing.large,
|
||||||
}
|
}
|
||||||
|
|
||||||
const label = {
|
const label = {
|
||||||
fontSize: sizes.small,
|
fontSize: sizes.small,
|
||||||
textTransform: 'uppercase'
|
textTransform: 'uppercase',
|
||||||
}
|
}
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
accentOrange: {
|
accentOrange: {
|
||||||
...accentTextSmall,
|
...accentTextSmall,
|
||||||
color: Colors.orange
|
color: Colors.orange,
|
||||||
|
},
|
||||||
|
accentPurple: {
|
||||||
|
...accentTextSmall,
|
||||||
|
color: Colors.purple,
|
||||||
},
|
},
|
||||||
accentPurpleBig: {
|
accentPurpleBig: {
|
||||||
...accentTextBig,
|
...accentTextBig,
|
||||||
color: Colors.purple
|
color: Colors.purple,
|
||||||
},
|
},
|
||||||
accentPurpleGiant: {
|
accentPurpleGiant: {
|
||||||
...accentTextGiant,
|
...accentTextGiant,
|
||||||
color: Colors.purple
|
color: Colors.purple,
|
||||||
},
|
},
|
||||||
accentPurpleHuge: {
|
accentPurpleHuge: {
|
||||||
...accentTextHuge,
|
...accentTextHuge,
|
||||||
color: Colors.purple
|
color: Colors.purple,
|
||||||
},
|
},
|
||||||
mainText: {
|
mainText: {
|
||||||
fontFamily: fonts.main,
|
fontFamily: fonts.main,
|
||||||
fontSize: sizes.base
|
fontSize: sizes.base,
|
||||||
},
|
},
|
||||||
label: {
|
label: {
|
||||||
...label
|
...label,
|
||||||
},
|
},
|
||||||
labelBold: {
|
labelBold: {
|
||||||
color: Colors.greyDark,
|
color: Colors.greyDark,
|
||||||
fontWeight: 'bold',
|
fontWeight: 'bold',
|
||||||
...label
|
...label,
|
||||||
},
|
},
|
||||||
labelLight: {
|
labelLight: {
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
@@ -91,7 +95,7 @@ export default {
|
|||||||
},
|
},
|
||||||
subtitle: {
|
subtitle: {
|
||||||
fontSize: sizes.subtitle,
|
fontSize: sizes.subtitle,
|
||||||
...title
|
...title,
|
||||||
},
|
},
|
||||||
title: {
|
title: {
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
@@ -99,7 +103,7 @@ export default {
|
|||||||
fontWeight: '700',
|
fontWeight: '700',
|
||||||
fontSize: sizes.title,
|
fontSize: sizes.title,
|
||||||
marginHorizontal: Spacing.base,
|
marginHorizontal: Spacing.base,
|
||||||
...title
|
...title,
|
||||||
},
|
},
|
||||||
titleWithoutMargin: {
|
titleWithoutMargin: {
|
||||||
alignSelf: 'center',
|
alignSelf: 'center',
|
||||||
@@ -107,5 +111,5 @@ export default {
|
|||||||
fontFamily: fonts.bold,
|
fontFamily: fonts.bold,
|
||||||
fontWeight: '700',
|
fontWeight: '700',
|
||||||
fontSize: sizes.title,
|
fontSize: sizes.title,
|
||||||
}
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user