1
0
mirror of https://github.com/tooot-app/app synced 2025-06-05 22:19:13 +02:00
Files
tooot/src/components/Header/Center.tsx
2022-08-13 00:48:20 +02:00

33 lines
653 B
TypeScript

import CustomText from '@components/Text'
import { useTheme } from '@utils/styles/ThemeManager'
import React from 'react'
export interface Props {
content: React.ReactNode | string
inverted?: boolean
onPress?: () => void
}
// Used for Android mostly
const HeaderCenter: React.FC<Props> = ({
content,
inverted = false,
onPress
}) => {
const { colors } = useTheme()
return (
<CustomText
style={{
fontSize: 18,
color: inverted ? colors.primaryOverlay : colors.primaryDefault
}}
fontWeight='Bold'
children={content}
{...(onPress && { onPress })}
/>
)
}
export default HeaderCenter