2020-11-22 00:46:23 +01:00
|
|
|
import React from 'react'
|
2020-12-03 01:28:56 +01:00
|
|
|
import { StyleSheet, Text, View } from 'react-native'
|
2020-12-13 14:04:25 +01:00
|
|
|
import { StyleConstants } from '@utils/styles/constants'
|
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
2020-11-22 00:46:23 +01:00
|
|
|
|
|
|
|
export interface Props {
|
|
|
|
heading: string
|
|
|
|
}
|
|
|
|
|
|
|
|
const MenuHeader: React.FC<Props> = ({ heading }) => {
|
2020-12-03 01:28:56 +01:00
|
|
|
const { theme } = useTheme()
|
|
|
|
|
|
|
|
return (
|
|
|
|
<View style={[styles.base, { borderBottomColor: theme.separator }]}>
|
|
|
|
<Text>{heading}</Text>
|
|
|
|
</View>
|
|
|
|
)
|
2020-11-22 00:46:23 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
const styles = StyleSheet.create({
|
2020-12-03 01:28:56 +01:00
|
|
|
base: {
|
|
|
|
borderBottomWidth: 1,
|
|
|
|
paddingLeft: StyleConstants.Spacing.Global.PagePadding,
|
|
|
|
paddingRight: StyleConstants.Spacing.Global.PagePadding,
|
|
|
|
paddingBottom: StyleConstants.Spacing.S
|
2020-11-22 00:46:23 +01:00
|
|
|
}
|
|
|
|
})
|
|
|
|
|
|
|
|
export default MenuHeader
|