import React from 'react'; import { View, StyleSheet, TextStyle, ViewStyle } from 'react-native'; import { useStyles } from '../../hooks'; import { ComponentStyleProp, LLComponentStyleFn } from '../../types'; import { LLText } from '../LLText'; export type LLChatHeaderStyles = { headerContainer: ViewStyle; headerTitle: TextStyle; }; export type LLChatHeaderProps = ComponentStyleProp & { title: string; }; export function LLChatHeader({ title, styles: stylesProp }: LLChatHeaderProps) { const headerStyles = useStyles({ componentStylesFn: getChatHeaderStyles, stylesProp, }); return ( {title} ); } const getChatHeaderStyles: LLComponentStyleFn = ({ theme, }) => StyleSheet.create({ headerContainer: { display: 'flex', flexDirection: 'row', padding: 12, }, headerTitle: { alignSelf: 'center', fontSize: 16, textAlign: 'center', flex: 1, color: theme.text, }, });