mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
Poll working
But did not re-render
This commit is contained in:
@ -1,19 +1,28 @@
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
import { StyleSheet, Text, View } from 'react-native'
|
||||
import { StyleConstants } from 'src/utils/styles/constants'
|
||||
import { useTheme } from 'src/utils/styles/ThemeManager'
|
||||
|
||||
export interface Props {
|
||||
heading: string
|
||||
}
|
||||
|
||||
const MenuHeader: React.FC<Props> = ({ heading }) => {
|
||||
return <Text style={styles.header}>{heading}</Text>
|
||||
const { theme } = useTheme()
|
||||
|
||||
return (
|
||||
<View style={[styles.base, { borderBottomColor: theme.separator }]}>
|
||||
<Text>{heading}</Text>
|
||||
</View>
|
||||
)
|
||||
}
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
header: {
|
||||
marginTop: 12,
|
||||
paddingLeft: 12,
|
||||
paddingRight: 12
|
||||
base: {
|
||||
borderBottomWidth: 1,
|
||||
paddingLeft: StyleConstants.Spacing.Global.PagePadding,
|
||||
paddingRight: StyleConstants.Spacing.Global.PagePadding,
|
||||
paddingBottom: StyleConstants.Spacing.S
|
||||
}
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user