1
0
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:
Zhiyuan Zheng
2020-12-03 01:28:56 +01:00
parent 8986680c6d
commit 7d7c907fa3
35 changed files with 1125 additions and 766 deletions

View File

@ -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
}
})