2022-05-07 00:52:32 +02:00
|
|
|
import CustomText from '@components/Text'
|
2021-01-14 00:43:35 +01:00
|
|
|
import { useTheme } from '@utils/styles/ThemeManager'
|
|
|
|
import React from 'react'
|
|
|
|
|
|
|
|
export interface Props {
|
|
|
|
content: string
|
2021-02-10 00:40:44 +01:00
|
|
|
inverted?: boolean
|
2021-01-14 00:43:35 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
// Used for Android mostly
|
|
|
|
const HeaderCenter = React.memo(
|
2021-02-10 00:40:44 +01:00
|
|
|
({ content, inverted = false }: Props) => {
|
2022-02-12 14:51:01 +01:00
|
|
|
const { colors } = useTheme()
|
2021-01-14 00:43:35 +01:00
|
|
|
|
|
|
|
return (
|
2022-05-07 00:52:32 +02:00
|
|
|
<CustomText
|
|
|
|
style={{
|
|
|
|
fontSize: 18,
|
|
|
|
color: inverted ? colors.primaryOverlay : colors.primaryDefault
|
|
|
|
}}
|
2022-05-10 23:19:26 +02:00
|
|
|
fontWeight='Bold'
|
2021-01-14 00:43:35 +01:00
|
|
|
children={content}
|
|
|
|
/>
|
|
|
|
)
|
|
|
|
},
|
2021-03-18 23:32:31 +01:00
|
|
|
(prev, next) => prev.content === next.content
|
2021-01-14 00:43:35 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
export default HeaderCenter
|