mirror of
https://github.com/tooot-app/app
synced 2025-06-05 22:19:13 +02:00
More adaption to Android
This commit is contained in:
31
src/components/Header/Center.tsx
Normal file
31
src/components/Header/Center.tsx
Normal file
@ -0,0 +1,31 @@
|
||||
import { StyleConstants } from '@utils/styles/constants'
|
||||
import { useTheme } from '@utils/styles/ThemeManager'
|
||||
import React from 'react'
|
||||
import { StyleSheet, Text } from 'react-native'
|
||||
|
||||
export interface Props {
|
||||
content: string
|
||||
}
|
||||
|
||||
// Used for Android mostly
|
||||
const HeaderCenter = React.memo(
|
||||
({ content }: Props) => {
|
||||
const { theme } = useTheme()
|
||||
|
||||
return (
|
||||
<Text
|
||||
style={[styles.text, { color: theme.primary }]}
|
||||
children={content}
|
||||
/>
|
||||
)
|
||||
},
|
||||
() => true
|
||||
)
|
||||
|
||||
const styles = StyleSheet.create({
|
||||
text: {
|
||||
...StyleConstants.FontStyle.M
|
||||
}
|
||||
})
|
||||
|
||||
export default HeaderCenter
|
Reference in New Issue
Block a user